Jump to content

chmod in linux


Fluf

Recommended Posts

The thing is I have several users in my slackware box and i'm running websiste too in this box.

But i can't find a right chmod for protecting some folders and files.All i want to do is this.

protect folder data/ from normal users, only root can enter in there, but i want that everybody is able to get in this folder via browser, not to view files, but to see the front page..

 

 

Link to comment
https://forums.phpfreaks.com/topic/130472-chmod-in-linux/
Share on other sites

suPHP will execute php files as the user.

 

In your case, what is apache running as? Is it "nobody"?

You also said "chown -R nobody data/"

 

Well where is that data folder stored? All parent folders must be executable by the world. I.E.

 

/home/user/data

chown -R nobody data/

chmod 700 data

 

You also have to do this:

chmod 711 /home/user

 

-steve

Link to comment
https://forums.phpfreaks.com/topic/130472-chmod-in-linux/#findComment-679321
Share on other sites

You can use this

 

cd /home/user/data

chown -R nobody data/

chmod 644 data

-rw-r--r-- 1 nobody user 0 Nov  1 23:15 data/

 

Mostly the site use this chmod combination 8)

The thing is I have several users in my slackware box and i'm running websiste too in this box.

But i can't find a right chmod for protecting some folders and files.All i want to do is this.

protect folder data/ from normal users, only root can enter in there, but i want that everybody is able to get in this folder via browser, not to view files, but to see the front page..

Link to comment
https://forums.phpfreaks.com/topic/130472-chmod-in-linux/#findComment-680347
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.