[RESOLVED] 0755 issue

MikeDVB

Well-Known Member
#1
I have a client that has an /images folder that is set to 0755, they wanted to set the folder and images to 0644 but when they do that all of the images show "File Not Found" by LiteSpeed.

I don't remember having to set permission to execute image files before they can be read... I would think read would be sufficient.

Is there any reason why these files require execute permission to be viewed by LiteSpeed WebServer?
 

NiteWave

Administrator
#2
In my memory(not search it at the moment), execution bit for folder determine user can enter the folder or not. so for 755, all users(owner,group and other user) are permitted to enter the folder, while 644 means no user including owner can't enter the folder. only root can enter the folder.
 

MikeDVB

Well-Known Member
#3
In my memory(not search it at the moment), execution bit for folder determine user can enter the folder or not. so for 755, all users(owner,group and other user) are permitted to enter the folder, while 644 means no user including owner can't enter the folder. only root can enter the folder.
I've set 0644 previously on folders and the web server was still able to access them but that was Apache.

This folder is part of a zen-cart install that (is up to date) but seems to keep being exploited where the images folder has perl scripts uploaded that are being executed. It's no big deal for them to be uploaded if they can't be executed but trying to prevent this has lead to this issue.

I guess I'll look at some mod_sec rules for ZenCart and see what I can find, but of course I will still watch this thread.
 

NiteWave

Administrator
#4
Sorry, looks like I didn't read carefully your original question.
then how about set folder /images as 0755 and files under /images as 0644? that should work. otherwise looks like an issue.
 

MikeDVB

Well-Known Member
#5
Sorry, looks like I didn't read carefully your original question.
then how about set folder /images as 0755 and files under /images as 0644? that should work. otherwise looks like an issue.
Even if I set the folder as 0644 it should *still* be able to access all files contained within.

If I set the folder to 0755 and the images inside to 0644 LiteSpeed returns "File Not Found" for every image.
 
Last edited:

mistwang

LiteSpeed Staff
#6
directory with 0755 and file with 0644 permission is world readable. I think the problem might be the permission mask of parent directory.
 

MikeDVB

Well-Known Member
#7
directory with 0755 and file with 0644 permission is world readable. I think the problem might be the permission mask of parent directory.
I checked and made sure that the permissions and ownerships were all correct all the way up to /

I'll do some more testing and update the thread.

I'm not sure if maybe it was a bug in an older version of LiteSpeed but I just ran the 4.0.13 install on the server and rebuilt PHP and that seems to have cleared it up... really not sure.
 
Last edited:
Top