Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Search Forums:



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 05-01-2008
Registered User
 

Join Date: Apr 2008
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Setting permissions

I've been told I need to set the permissions for everything in the htdocs folder to 777, but how do I go about doing this?
Thanks
Sponsored Links
    #2  
Old 05-01-2008
vgersh99's Avatar
ɹoʇɐɹǝpoɯ
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 6,959
Thanks: 69
Thanked 351 Times in 338 Posts
'man chmod'
Sponsored Links
    #3  
Old 05-01-2008
Registered User
 

Join Date: Apr 2008
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
sorry, I don't understand that - what does that mean and where do I put that?
    #4  
Old 05-01-2008
Registered User
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
777 = everybody can execute and alter everything. That is for sure not what you want. However, it would go as follows (escaping like bash):

Code:
find /whereever/my/htdocs/are/ -exec chmod 777 {} \;

Better do the following (everybody can read, only owner can alter or execute):

Code:
find /whereever/my/htdocs/are/ -type d -exec chmod 755 {} \;
find /whereever/my/htdocs/are/ -type f -exec chmod 644 {} \;

If some cgi needs to write to some location beneath htdocs change ownership of those files/directories to the user used by your webserver to run cgis (normally apache, httpd oder nobody).

Quote:
Originally Posted by thehaapyappy View Post
sorry, I don't understand that - what does that mean and where do I put that?
Put that into command line - it will display help about chmod command. Use "man find" to find out what above does in detail.
Sponsored Links
    #5  
Old 05-01-2008
Dave Miller's Avatar
Registered User
 

Join Date: Dec 2007
Location: Northern NJ, USA
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vgersh99 View Post
'man chmod'
Quote:
Originally Posted by thehaapyappy View Post
sorry, I don't understand that - what does that mean and where do I put that?
man is a build in technical manual. Simply enter man [command] to get details about any unix command. Of course, you need to know WHICH command.

chmod is the command to change permissions.

One thing about man: read the whole thing, particularly the last few lines. There you're see references to similar commands that may be helpful.
Sponsored Links
    #6  
Old 05-01-2008
Registered User
 

Join Date: Apr 2008
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Okay thanks, I've got the man chmod and am now about to read it, but how do I find out where the file to change the htdocs permissions is?
Sponsored Links
    #7  
Old 05-01-2008
Registered User
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
htdocs is no single file but a folder. Ask the one who installed your system, he'll tell you. Maybe Have a look for /srv/www/htdocs , /var/www , /var/lib/apache/htdocs .

If you've installed the system yourself start reading the documentation coming with it - it will help you to actually understand what to do.
Sponsored Links
Closed Thread

Tags
unix commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help setting up file permissions andrewpmoore UNIX for Dummies Questions & Answers 0 04-24-2008 07:46 AM
To give the "unzip" permissions & "create" file permissions Mike1234 HP-UX 3 03-02-2008 04:34 PM
Setting Default Permissions for Files robbieg UNIX for Dummies Questions & Answers 1 11-24-2004 04:26 PM
Permissions on /bin josramon UNIX for Advanced & Expert Users 7 04-02-2003 10:50 AM
permissions mma_buc_98 UNIX for Dummies Questions & Answers 1 08-13-2002 05:15 PM



All times are GMT -4. The time now is 03:57 AM.