Permissions 755 vs 775

I tried uploading the install zip to my server and extracting, then moving the files and overwriting the old ones. When I tried to run the setup.php file nothing happened.

So I contacted Bluehost and they said I need to have folder permissions set at 755 instead of 775 and files 644 instead of 664. It appears that my file manager when unzipping made the folders 775 instead. I tried via plain ftp and that didn't do any different. It just makes no sense to spend tons of time manually changing all of these... what can I do to speed up the process? They insisted this made a difference. And I guess they are right because the error log says
SoftException in Application.cpp:601: Directory xxx" is writeable by group. Premature end of script headers: setup.php

The other thing that comes into the picture is I have a password on the folder. Could that cause an issue?

Thanks.

Comments

  • fretzl Administrator, Developer
    It's best to unzip the package before uploading as explained here `http://www.zenphoto.org/news/installation-and-upgrading#1`

    As for the "tons of time" to change them, your FTP client should be able to do that in no time.
  • To me, your link doesn't really specify it's better to upload them after extraction, it just tells you a way to get the files on your host, especially if you have no way of extracting after upload. I figured you just were using the most generic instructions. Why is it better not to upload as a zip and extract?

    Thanks for the tip on permissions. I see FireFTP allows you to change subfolder permissions by right-clicking on the folder and choosing properties (incl contents). Hopefully I'm good to go there. It does take a few minutes to think through all the files but much better than doing it by hand.
  • acrylian Administrator, Developer
    I think it probably makes no difference. At least if uploading a file directly it is set to permissions set by the server normally. I guess that happens or should happen also on unzipping (which I cannot do on my server).

    Normally setup should try to change the permissions but on some hosts that is not allowed/does not work as expected. You ftp client should provide an option to include child items on changing as well.
  • After fixing file permissions with fireftp everything worked out. Great! Thanks for the help.
  • Glad things are working. Just FYI on the permissions. 0755 is the prefered permissions, but only if it works on your server.
    0775 is almost as secure. Just that in this case the "group" has also got write permissions on the folder. That should not be a problem if your server is properly configured. However, it is possible for the "group" to include users not related to you whom you might not want to have write access to your folders.

    First digit of the code (7) = Owner has read, write, and execute priviledges
    Second digit of the code (7 or 5) = "group" has read, possibly write, and execute priviledges
    Third digit of the code (5) = the public has read and execute priviledges.
  • Yes thanks, that's what I kind of thought on permissions also, but Bluehost simply will not run setup if it finds a 775 permission for some reason. At any rate, as long as I know what's wrong I can fix it :)
Sign In or Register to comment.