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
Share on other sites

It's not apache fault, i know how chmod works and stuff, but this thing what i want just don't work.

1 for execute, 4 - read, 2-write and i what i want is something like this.

750, normal user has no access to this folder, but with browser you can get access to this folder.

Link to comment
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.