PDA

View Full Version : quick question of file permissions


sandy
3-24-08, 08:53 PM
I just noted the "closed" thread on file permissions. However, I'm a bit confused since I see different settings within the same directory, and just want to make sure that "IF" I need to change anything, that I change the correct settings.

For example, a majority of my images in various directories have the following settings:
-rwxr-xr-x

Then there are a large number that have the following settings: -rw-r--r--

I see that with some of my .shtml files as well. Until the thread, I was not aware, and, never was concerned.

Should I be? If there is a difference and I need to make a change, should all of my images be set to 644 or leave them as they are?

Suggestions?

Thanks,

snowmaker
3-25-08, 09:03 PM
The image files apparently are set to 755 (rwxr-xr-x) which will work fine, the only 'problem' being the permissions are set too high, although not dangerously high (as 777 (rwxrwxrwx) would be). 644 (rw-r--r--) will work safely for image files too.

Neat Pete
3-25-08, 10:10 PM
Does PowWeb alter file permissions automatically, or advise users when file permissions are inappropriate?

Croc Hunter
3-26-08, 03:03 AM
Neat Pete: No, that is your responsibility. In general Folders 755 files 644. If they work at a lower Chmod value eg: .php files 600 then great use that if you like. Security wise for most it's much more important to keep your CMS etc type files up to date with latest versions.

Neat Pete
3-26-08, 05:22 AM
Croc, this is not what I am getting at all.

My files and folders are uploading as 755. My .htaccess file is currently uploading as 744, but this variation only began last November, prior to that it was 755 like all the other files.

Croc Hunter
3-26-08, 08:05 AM
Sorry Pete, my "No" was no they do not notify you of incorrect or other permission changes. Speaking in general as it's dependant upon the many applications Powweb has to cater for as a shared host. I can only assume Powweb prefers 744 for dotfiles now to suit the majority of customers and in interests of security. Personally I 600 any .htaccess or .htpasswd type of files at Powweb.

[edit] I uploaded a .htaccess as a test with the latest version of FileZilla it was 644 as was a htaccess.txt file. I 600'd it and it works fine.

dmacminn
3-26-08, 10:22 AM
Generally, the 755 is for directories and 644 for regular files ... your home dir (which you shouldn't be touching the permissions on) will be set by the system to 750 ... Note, that's not your webroot (which is the /htdocs).

There is some possible weirdness if you are using ShopSite, FrontPage or SiteDelux -- these products have their own ideas about what the permissions should be ... (SD for instance likes 770 on the folders its uses).

We don't monitor the permissions set (though setting 777 and 666 may prevent the Webserver pool from accessing files for security reasons in certain cases). We do ensure that the Home (which is the point above which your storage begins is 750 on a periodic basis); beyond that, you're at liberty to set the values...