Solved

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

Posted on 2016-08-23
8
86 Views
Last Modified: 2016-08-24
hello

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

ty
0
Comment
Question by:Eric Gamache
  • 4
  • 4
8 Comments
 
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.
0
 

Author Comment

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

Accepted Solution

by:
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.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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
0
 
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?
0
 

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
0
 

Author Closing Comment

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

Expert Comment

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Red Hat 7 Linux on Azure cannot run a command as root 22 53
000webhost.com default error log 1 40
awk to variable in bash 2 76
bash file 10 50
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). …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

830 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