Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

File permissions question.

How do I do I protect my files on a shared server?

4:05 am on Jan 29, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 11, 2002
votes: 0

What can I set a file permission to to keep other users on the same unix box from viewing my database passwords?

Or is there a workaround to this problem,

I can't afford a dedicated server yet:(


9:47 am on Jan 29, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 28, 2002
votes: 0

It all depends on the particular setup of users and groups on the server, so there is no straight answer. It might not even be possible, still depending on the particular setup.

The problem is that you want to access the file yourself, you want the web-server to access the file as well, but you want to keep all the other users out.

If, as it is common, all normal users (including you) are members of a common group, you can set the following permissions

owner you - permissions rwx
group common-user-group - permissions ---
other - permissions r-x

This means you will get in as owner, all other members of the common group will be denied, but others, including the web-server, allowed.

To get a better answer, you have to give us more information.