Results 1 to 14 of 14
  1. #1
    how to chmod 0777 local folders? ...Terminal?

    Member Since
    Jan 25, 2007
    Posts
    18
    Exclamation how to chmod 0777 local folders? ...Terminal?
    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

  2. #2
    how to chmod 0777 local folders? ...Terminal?
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,395
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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

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

    Member Since
    Jan 25, 2007
    Posts
    18
    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

  4. #4
    how to chmod 0777 local folders? ...Terminal?
    IvanLasston's Avatar
    Member Since
    Feb 26, 2010
    Location
    Rocky Mountain High, Colorado
    Posts
    2,116
    Specs:
    1.8 GHz i7 MBA 11" OSX 10.8.2
    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)

  5. #5
    how to chmod 0777 local folders? ...Terminal?
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,395
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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

  6. #6
    how to chmod 0777 local folders? ...Terminal?
    IvanLasston's Avatar
    Member Since
    Feb 26, 2010
    Location
    Rocky Mountain High, Colorado
    Posts
    2,116
    Specs:
    1.8 GHz i7 MBA 11" OSX 10.8.2
    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

  7. #7
    how to chmod 0777 local folders? ...Terminal?
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,395
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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:
    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

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

    Member Since
    Jan 25, 2007
    Posts
    18
    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?

  9. #9
    how to chmod 0777 local folders? ...Terminal?
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,395
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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

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

    Member Since
    Jan 25, 2007
    Posts
    18
    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

  11. #11
    how to chmod 0777 local folders? ...Terminal?
    IvanLasston's Avatar
    Member Since
    Feb 26, 2010
    Location
    Rocky Mountain High, Colorado
    Posts
    2,116
    Specs:
    1.8 GHz i7 MBA 11" OSX 10.8.2
    .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

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

    Member Since
    Jan 25, 2007
    Posts
    18
    Good news, the developer said I can use 755 permissions as long as my "server communicates with PHP with CGI mode"

  13. #13
    how to chmod 0777 local folders? ...Terminal?
    Groovetube's Avatar
    Member Since
    Nov 15, 2011
    Location
    Toronto
    Posts
    287
    Specs:
    Retina MBP 2.7 768ssd/16gig ram /30" dell 3008. and bunch of other mac/apple stuff
    if your on a webserver that supports suPHP, you can avoid the whole 777 danger altogether.

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

    Member Since
    Jan 25, 2007
    Posts
    18
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Managing local folders in Mail
    By wizardchef in forum Apple Desktops
    Replies: 0
    Last Post: 08-05-2012, 11:34 AM
  2. Access certain folders only over local network
    By Jonik in forum Internet, Networking, and Wireless
    Replies: 0
    Last Post: 11-17-2011, 05:31 AM
  3. Why Terminal highlights folders yellow?
    By peen in forum OS X - Development and Darwin
    Replies: 3
    Last Post: 08-11-2011, 03:15 PM
  4. Folders invisible in Terminal
    By oliq in forum OS X - Operating System
    Replies: 0
    Last Post: 06-02-2007, 04:37 AM
  5. restricting access to shared folders/volumes on local network
    By nick_harambee in forum OS X - Operating System
    Replies: 1
    Last Post: 04-02-2007, 07:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •