Posted 18 January 2012 - 04:41 AM
Can anyone point me to a tutorial of how to set your file permissions?
I used check permissions b4 in oscommerce 2.2 but don't know how to do it without that add on.
Posted 19 January 2012 - 09:12 AM
But, read your dreamweaver help would be a good place to start.
What Permissions Should Files And Folders Have
Edited by geoffreywalton, 19 January 2012 - 09:13 AM.
Virus Threat Scanner
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Basic design info.
For links mentioned in old answers that are no longer here follow this link Useful Threads.
If this post was useful, click the Like This button over there ======>>>>>.
Posted 06 April 2012 - 08:46 PM
Posted 07 April 2012 - 06:30 PM
What permissions to use depends upon your hosting and how it's set up. On a Linux system you will see either rwxr-xr-x style or 755 style (they're interchangable). Directories are usually 755 (writable only by the owner). For any directory where the program needs to upload files to (or otherwise write in), try 755 first, although you may need to make it writable by group (775) or even world writable (777 -- change back to 755 when you're done uploading). You probably don't need to make any directory read-only, but that would be 555. Files are usually 644 (writable only by the owner). The same conditions apply as for directories, except "111" less. At least the two "configure.php" files need to be "read-only", which is usually 444. Ask your host for specific instructions if you can't figure this out. For most people, just use the default permissions but change configure.php to read-only. For some, you'll get error messages that osC is unable to write to a specific directory -- you'll need to add "write" permission (+020, or even +022) for just that directory.
On a Windows server, you may want or need to add "read-only" attributes to folders and/or selected files. I don't use a Windows server, so it would be best to ask your host or someone else who does use one. Your hosting service control panel will have the tools to do all this.
Posted 20 April 2012 - 08:54 AM
I use osc 2.3.1 and I've set the permissions to 664 for these 2 files.
My guess would be to set those to 444 for security reasons, but then osc admin shows errors that these files should be writable... 644 isn't accepted either, the errors will only disappear with permissions set to 664. Why is that, and is it safe enough??
Little extra question about the permission settings for images. The ones I uploaded are set to 777, is this okay? I also see some are set to 644, why are those different and might that be a better setting?
Posted 20 April 2012 - 02:54 PM
644 means that the owner (you) can write to them, as well as any program running as owner (some PHP installations). That you have to use 664 simply means that PHP is not running as owner, but in your group. That should be reasonably safe. What you need to be careful about is if PHP is running as a random user ("world/other") and you have to grant xx6 permissions for specific files and xx7 permissions for specific directories. Those open up those files and directories to any other user sharing your system to overwrite files! In some configurations, visitors on the Web might even be able to write to them! In such a case, you want to change back to 644/755 as soon as you're done uploading files or whatever calls for osC (running PHP) to write files.
777 is bad for any file. Change them to 644. First of all, "7" means that it's read-write for everyone on the server, as well as unnecessarily setting the "execute bit" (needed only for directories and some executable files, such as binaries and shell scripts). If they were uploaded through osC, that's because there's some idiot code in osC that blindly sets permissions to 777.