No announcement yet.

chmod 777 or 755 on _lib folder

  • Filter
  • Time
  • Show
Clear All
new posts

  • chmod 777 or 755 on _lib folder

    I like to know which system you use to change the permissions on the folder _lib, after deploying an application server

    I saw that there would be several systems
    1.) change in the File Manager server, one by one the folders and files to 777 or 755

    2.) Make a small program in php, containing the lines
    chmod -R 777 / home / admin / domains / domain_name / public_html / folder /

    3.) make changes to the FTP

    Changing all folders to 777, it seems that is not recommended for server security.

    Does you upload the zip file with FTP or with the file manager?

    Thanks for your comments

    best regards

  • #2
    Some users have problems regarding permissions. When they are uploading files you can a message likes this "500 Internal Server Error" or when trying to creating the connection on scriptcase deploy environment you get an error like this "failed to open stream: Permission denied" or when you to try register in your scriptcase.
    The first thing that some people say its to give 777 permission. The first "7" is the total permission for the owner, the second one is for the group and the third "7" is for everyone. Here is the trick, for hosts company, a permission 777 is a security issue for php files. "Everyone" can't have total permission. So you cant an internal server error.
    The correct permissions are:
    Folders: 755
    Files: 644

    So, how to fix?


    Open a shell (or putty on windows) and log in into your SSH account;
    Execute this command at the prompt for folders: find /home/YOURUSER/public_html/ -type d -exec chmod 755 {} \;
    Execute this command at the prompt for files: find /home/YOURUSER/public_html/ -type f -exec chmod 644 {} \;
    Execute this command at the prompt for fix owner (only if the files aren't if your username): chown YOURUSER.YOURUSER /home/YOURUSER/public_html/ -R


    • #3
      In general you can set the rights using filezilla which will be the case for most users who do not have shell access. If you setup the connection in production you need to set the rights of the (sub) folders of _lib to 777. After setting up the connection, you don't need that right any more and can set it back to 644.
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development /