New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

how to chmod 0777 local folders? ...Terminal?


Post Reply New Thread Subscribe

 
Thread Tools
JDubya

 
Member Since: Jan 25, 2007
Posts: 18
JDubya is on a distinguished road

JDubya is offline
I know how to chmod files on a server via FTP but these are local files. I just installed WordPress and an e-commerce theme on a localhost via MAMP. However, when I activated the theme, it said I need to adjust the writing permissions to chmod 0777 of a few folders (bills, dl, uploads, and cache). I've seen a few different Terminal command lines recommended to chmod but I'm not well-versed in Terminal and I don't want to screw anything up. What do I need to do? (I'm running OS X 10.7.2) Thanks
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,014
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
You can avoid the Terminal here. Right click the folders and changed the permissions for each user/group to read & write.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
JDubya

 
Member Since: Jan 25, 2007
Posts: 18
JDubya is on a distinguished road

JDubya is offline
Quote:
Originally Posted by vansmith View Post
You can avoid the Terminal here. Right click the folders and changed the permissions for each user/group to read & write.
I already tried that but it doesn't change it to 0777
QUOTE Thanks
IvanLasston

 
IvanLasston's Avatar
 
Member Since: Feb 26, 2010
Location: Rocky Mountain High, Colorado
Posts: 2,116
IvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to behold
Mac Specs: 1.8 GHz i7 MBA 11" OSX 10.8.2

IvanLasston is offline
It is a terminal command
Code:
chmod 777 <name of file or folder>
If you make it 777 on a file it means world read/write/execute.
If you make a folder 777 it also means world read/write but the last bit although still execute means world can go into the folder. Note the chmod command and 777 can be a very dangerous thing - giving access and execution rights to everyone usually isn't recommended.

You usually want 755 for directories and 644 for files which is owner r/w everyone else read-only - and files non-executable.

For reference here is how numbering of chmod works which is based on Octal representation of the 3 permissions fields. user, group, everyone
chmod by the Numbers
(There 000 000 010 types of people - those who understand Octal and those who don't)
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,014
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
It sure does but it doesn't do it recursively. If you need to do it recursively, click the lock in the bottom corner, make the changes, click the "gear button" and select "Apply to enclosed items."

If you want to do it the command line way, simply execute the following:
Code:
chmod -R 777 <name of folder>
Note that this does it recursively - remove the -R to apply the command to the folder only.

I'm also surprised that you were asked to use rwx permissions - that's a terrible design decision.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
IvanLasston

 
IvanLasston's Avatar
 
Member Since: Feb 26, 2010
Location: Rocky Mountain High, Colorado
Posts: 2,116
IvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to behold
Mac Specs: 1.8 GHz i7 MBA 11" OSX 10.8.2

IvanLasston is offline
I didn't mention recursive as I already feel that a 777 is dangerous. -R means everything below becomes world read/write. I highly recommend against using -R 777 unless you really, really know what you are doing and why.

Here is the top level page of the chmod tutorial I pointed to - if you want to know the gory details and all that chmod can do.
Tutorial for chmod
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,014
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Quote:
Originally Posted by IvanLasston View Post
I didn't mention recursive as I already feel that a 777 is dangerous. -R means everything below becomes world read/write. I highly recommend against using -R 777 unless you really, really know what you are doing and why.
Couldn't agree more. I only suggested it since changing the option only for the folder didn't seem to work.

JDubya, I've worked with Wordpress and never in my life have I seen it require 777 permissions. The Wordpress site even has a page on permissions in which they discuss the dangers of 777 (see here). To quote that page:
Quote:
I've never come across anything that needed more than 767, so when you see 777 ask why its necessary.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
JDubya

 
Member Since: Jan 25, 2007
Posts: 18
JDubya is on a distinguished road

JDubya is offline
Yeah, I've read a lot about the dangers of 777 so I contacted the developer about the issue. They said one of the folders, is protected with an additional .htaccess file. However, I don't think the others are so I may see if I can also protect them via .htaccess

Is .htaccess adequate protection for 777 permissions?
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 18,014
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
As noted on the page I linked to, 644 is the recommended set of permissions for the .htaccess file. If they are suggesting 777 for everything, they're going against Wordpress' own set of recommendations.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Writing a Quality Post
QUOTE Thanks
JDubya

 
Member Since: Jan 25, 2007
Posts: 18
JDubya is on a distinguished road

JDubya is offline
Quote:
Originally Posted by vansmith View Post
As noted on the page I linked to, 644 is the recommended set of permissions for the .htaccess file. If they are suggesting 777 for everything, they're going against Wordpress' own set of recommendations.
not "everything", there are 4 folders they require to be 777. One of which is protected via .htaccess. I'm wondering if I should protect them all with .htaccess, or is that not good enough
QUOTE Thanks
IvanLasston

 
IvanLasston's Avatar
 
Member Since: Feb 26, 2010
Location: Rocky Mountain High, Colorado
Posts: 2,116
IvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to beholdIvanLasston is a splendid one to behold
Mac Specs: 1.8 GHz i7 MBA 11" OSX 10.8.2

IvanLasston is offline
.htaccess sets up permissions for everything below as well - so you usually only need one at the root directory - unless you are trying to change something down below.
Comprehensive guide to .htaccess- intro
Old version apache info - but still top link in google
Apache Tutorial: .htaccess files
QUOTE Thanks
JDubya

 
Member Since: Jan 25, 2007
Posts: 18
JDubya is on a distinguished road

JDubya is offline
Good news, the developer said I can use 755 permissions as long as my "server communicates with PHP with CGI mode"
QUOTE Thanks
Groovetube

 
Groovetube's Avatar
 
Member Since: Nov 15, 2011
Location: Toronto
Posts: 290
Groovetube has a spectacular aura about
Mac Specs: Retina MBP 2.7 768ssd/16gig ram /30" dell 3008. and bunch of other mac/apple stuff

Groovetube is offline
if your on a webserver that supports suPHP, you can avoid the whole 777 danger altogether.
QUOTE Thanks
JDubya

 
Member Since: Jan 25, 2007
Posts: 18
JDubya is on a distinguished road

JDubya is offline
Quote:
Originally Posted by Groovetube View Post
if your on a webserver that supports suPHP, you can avoid the whole 777 danger altogether.
Yup! 755 is working great
QUOTE Thanks

Post Reply New Thread Subscribe


« iWeb problem | Mac Server Advice »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
how can i browse my local network? silverr Internet, Networking, and Wireless 11 01-17-2012 10:32 PM
Access certain folders only over local network Jonik Internet, Networking, and Wireless 0 11-17-2011 05:31 AM
Keeping Local mailboxes on an External Drive--Envelope Index Questio mr10012 OS X - Apps and Games 0 04-05-2008 05:58 AM
Dreamweaver, OS X 10.4.7: Can't find local folder bdemil Web Design and Hosting 0 08-20-2006 02:05 PM
Terminal Help rs2sensen OS X - Apps and Games 1 04-25-2005 10:52 PM

All times are GMT -4. The time now is 01:23 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?