LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-17-2004, 03:44 AM   #1
JanDeMan
LQ Newbie
 
Registered: Apr 2004
Location: After PC
Distribution: Debian Woody 3.0
Posts: 26

Rep: Reputation: 15
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 ?
 
Old 04-17-2004, 04:23 AM   #2
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
su -c "chmod g+w /var/www"
 
Old 04-17-2004, 04:28 AM   #3
JanDeMan
LQ Newbie
 
Registered: Apr 2004
Location: After PC
Distribution: Debian Woody 3.0
Posts: 26

Original Poster
Rep: Reputation: 15
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 ?
 
Old 04-17-2004, 04:46 AM   #4
Muzzy
Member
 
Registered: Mar 2004
Location: Denmark
Distribution: Gentoo, Slackware
Posts: 333

Rep: Reputation: 30
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?
 
Old 04-17-2004, 05:03 AM   #5
JanDeMan
LQ Newbie
 
Registered: Apr 2004
Location: After PC
Distribution: Debian Woody 3.0
Posts: 26

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
Permission Denied jamesvenning1 Linux - Newbie 4 06-05-2005 11:32 AM
Permission denied jagman026 Fedora 3 01-01-2005 03:45 PM
Permission Denied ptreves Linux - Newbie 7 12-16-2004 02:14 PM
Permission denied? jbhoo Linux From Scratch 1 04-27-2002 09:12 PM


All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration