LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permission denied (https://www.linuxquestions.org/questions/linux-newbie-8/permission-denied-171214/)

JanDeMan 04-17-2004 03:44 AM

Permission denied
 
This is the easiest way to tell my problem ;)

Code:

# groups
jan www-data

Code:

# ls -la /var/www/
total 20
drwxr-xr-x    3 www-data www-data    4096 Apr 16 22:27 .
drwxr-xr-x  15 root    root        4096 Apr 16 22:16 ..
-rw-r--r--    1 www-data www-data    4110 Oct 26  2002 index.html
drwxr-xr-x    2 www-data www-data    4096 Apr 16 22:27 test

Code:

# mkdir /var/www/testdir
mkdir: cannot create directory `/var/www/testdir': Permission denied

Why i don't have the permission ?

/bin/bash 04-17-2004 04:23 AM

su -c "chmod g+w /var/www"

JanDeMan 04-17-2004 04:28 AM

Quote:

Originally posted by /bin/bash
su -c "chmod g+w /var/www"
now it works. Very much thx

Can you just explain what i did ?

Muzzy 04-17-2004 04:46 AM

su -c "chmod g+w /var/www"

su -c "command" means execute "command" as super user. This is needed because only root has permission to modify the var directory.

chmod changes the permissions of files/directories

g+w means 'group add writable' - allowing all users in the group www-data to modify the contents of the directory.

Does that help explain it?

JanDeMan 04-17-2004 05:03 AM

Quote:

Originally posted by Muzzy
su -c "chmod g+w /var/www"

su -c "command" means execute "command" as super user. This is needed because only root has permission to modify the var directory.

chmod changes the permissions of files/directories

g+w means 'group add writable' - allowing all users in the group www-data to modify the contents of the directory.

Does that help explain it?

Yes stupid me

drwxr-xr-x 3 www-data www-data 4096 Apr 16 22:27 .
The group don't have write permissions


All times are GMT -5. The time now is 03:50 AM.