LinuxQuestions.org
Register a domain and help support LQ
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, 02:53 PM   #1
reesee
Member
 
Registered: Jan 2004
Posts: 66

Rep: Reputation: 15
Setting permissions on wwwroot (is there a fast way?)


Hello

I am wondering if there is a fast way to apply 755 to all folders and 644 to all files in my wwwroot directory? I've been doing it the long way, which is chmod -R 644 wwwroot, then changing all of the folders one by one to 755, it takes awhile.

Thanks for the help.
 
Old 04-17-2004, 03:49 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
chmod 644 wwwroot/

chmod -R 755 wwwroot/*
 
Old 04-17-2004, 04:11 PM   #3
reesee
Member
 
Registered: Jan 2004
Posts: 66

Original Poster
Rep: Reputation: 15
Hi trickykid

When I do those command I am unable to enter wwwroot, am I doing something wrong? From a shell I am doing chmod 644 wwwroot/ then chmod -R 755 wwwroot/*

thanks for the help
 
Old 04-17-2004, 04:14 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Who is the owner of wwwroot/ ?

You could do it backwards maybe like this:

chmod -R 755 wwwroot/

And then:

chmod 644 wwwroot/
 
Old 04-17-2004, 04:35 PM   #5
reesee
Member
 
Registered: Jan 2004
Posts: 66

Original Poster
Rep: Reputation: 15
root is the owner of wwwroot. I thied what you said and still got access denied. I then changed the owner and group to my name and got the same thing.

 
Old 04-17-2004, 04:38 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally posted by reesee
root is the owner of wwwroot. I thied what you said and still got access denied. I then changed the owner and group to my name and got the same thing.

Well, you have to be logged in as root to change the permissions if your not already logged in as root..
 
Old 04-17-2004, 04:48 PM   #7
reesee
Member
 
Registered: Jan 2004
Posts: 66

Original Poster
Rep: Reputation: 15
I might be a noob but I knew that much.

What I did was (and you can tell me if I'm wrong).

chmod -R 644 wwwroot

find . -type d | xargs chmod 755


now every files is 644 and every folder is 755.
 
  


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
changing file permissions(fast reply required) Xing Linux - Software 11 09-19-2003 12:44 AM
Setting permissions sammckee Linux - Newbie 9 09-18-2003 06:01 PM
setting permissions Tigger Linux - Security 1 06-09-2003 10:20 AM
Setting Permissions johnnyde Linux - Newbie 1 05-22-2003 05:37 PM
Setting Permissions mythology Slackware 2 12-11-2002 03:14 AM


All times are GMT -5. The time now is 08:41 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