decapper Posted April 18, 2009 Posted April 18, 2009 After I was forced to move hosting companies I have found that my file permission are all 644. Does anyone know if this is correct. I have had to change a few files as oscommerce tells me too. Should I leave them all at 644?
Daemonj Posted April 21, 2009 Posted April 21, 2009 The majority of your files should be 644 except for anything that the webserver needs to be able to modify. In those cases they will need 777 permissions, which should be rare for security reasons. "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
labbs Posted April 22, 2009 Posted April 22, 2009 The majority of your files should be 644 except for anything that the webserver needs to be able to modify. In those cases they will need 777 permissions, which should be rare for security reasons. The above is correct where you have an osCommerce install in a shared hosting environment, and will also work in most other environments too! In my experience, if you ONLY have access via FTP to a server then you will inevitably have to set permissions to allow WORLD rights for files/directories that osCommerce needs write access to (i.e. 777 for directories, and 644 for files). N.B. Owner,Group,Other permissions are often expressed using decimal numbers, but you can work them out when you think of them as binary, each decimal number can be expressed as three binary bits corresponding to RWX (e.g. RWX = 111 = 7, RW- = 110 = 6, R-X = 101 = 5, R-- = 100 = 4, etc.). In other cases where you DO have SuperUser access then you should be able to set the ownership of the files/directories and be more restrictive in permissions (e.g. on dedicated *nix/Linux hosting). e.g. in a Linux environment In the root of your osCommerce install:- All files/directories have USER:GROUP set as <YOUR_FTP_USER>:<WEBSERVER_GROUP> #:> chown -R <YOUR_FTP_USER>:<WEBSERVER_GROUP> * All files have a minimum permissions of 644 chmod -R 644 * All directories have minimum permissions of 755 chmod -R 755 * All osCommerce Writable files have permissions of 664 chmod 664 <FILENAME> All osCommerce Writable directories have permissions of 775 chmod 775 <DIRECTORY> LABBS Web Services
Recommended Posts
Archived
This topic is now archived and is closed to further replies.