how to give permission www-data to access in my home folder

Posted on 2016-08-23
Last Modified: 2016-08-24

linux os : debian 8

how to give permission www-data to access in my home folder

my system user is gaaara

i would like give permission to www-data in groupe gaaara

Question by:Eric Gamache
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41767541
You add the users to the group that need access, so your user and the www user. Then change owner of the folder to the group. Make sure the group is getting rw rights on the folder. Test with a separate folder if you're unsure.

Author Comment

by:Eric Gamache
ID: 41767546
can you give me an exmple pleez :)
LVL 38

Accepted Solution

Gerwin Jansen, EE MVE earned 500 total points
ID: 41767611
groupadd your_groupname
  (to create your group)

usermod -a -G your_groupname gaaara
usermod -a -G your_groupname www-data

  (to add your users to the group)

mkdir ~/your_directory
  (create a test directory)

chown root:your_groupname ~/your_directory
  (change group of test directory)

chmod g+w ~/your_directory
  (give group write access)

Now logon as user gaaara and www-data and verify that you can write to the test directory.
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.


Author Comment

by:Eric Gamache
ID: 41767973
mmm it works and not workd

the torrent works juste owncloud is impossible to  write files in owncloud

p.s i use your exemple juste this line change

chown gaaara:your_groupname ~/your_directory

ty for your help
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41768217
>> mmm it works and not workd
Is it working, yes or no?

What do you mean with torrent and owncloud? There is nothing about that in your question?

Author Comment

by:Eric Gamache
ID: 41769100
i install a seedbox with owncloud juste owncloud use www-data

my question was a sign that I wanted to do

it works for my seedbox juste owncloud impossible to write in folder

Author Closing Comment

by:Eric Gamache
ID: 41769217
ty is my mistake it works ty :)
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41769285
OK, thanks for feedback ;)

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question