RSS 2.0
Browse posts:
Unanswered |
Mark all read
| Author | Message | ||
|---|---|---|---|
|
matt_t_hat Nucleus Geek Joined: 21 Aug 2005 Posts: 1124 Location: UK |
Can some one shed some light on this strange utterance by my host
_________________ Host Plugins | Blog | Hundred Quid A Day | My Big Fat Arse |
||
|
|
|||
|
ftruscot Nucleus Guru ![]() Joined: 22 Feb 2006 Posts: 7449 Location: Massachusetts |
I posted this somewhere else a while ago. I hope it helps. Basically, your apache runs as a user called apache (or something similar) who should not own or be in the group that owns your data files. So when you are setting modes, the last digit is the one that determines what the web server can see/do with files or directories. If the mode of a directory is 744, it means that the directory owner can read, write and traverse the directory, while the group and everybody (including the web server) can only read the directory (which means see it is there, not list its contents). The mode 755 allows the group and everybody (including the web server) to read the directory and traverse it (list its contents). As for files, a 744 or 644 will work because all the server needs to do it read the file and not execute it. To clarify the file security modes. Each of the three numbers represents permissions for an entity. The first number is the permissions of the file owner, the second number is that of the file's group, and the third number is for everybody. The number itself is really a three-bit binary number indicating whether or not the entity can read, write, or execute. Let's look at a diagram of common modes:
So, mode 777 allows everyone to read, write, and execute the files. mode 666 allows everyone to read and write the files. mode 644 allows the owner to read and write, while everyone else can only read. mode 755 allows the owner to read, write, and execute, while everyone else can only read and execute. In general you will want your files to be 644 and your directories 755 (execute for directories means traverse). You should only turn on the write and execute bits for specific and well thought out reasons. The web server generally runs under a special user, like apache, which shouldn't own your files, nor be in the group that owns the files, but should get its permissions from the everybody entity, which should always have a mode of 4 for files and 5 for directories, except where specified for certain purposes (like the media directory and the skins directories, if you would like to manage the files from the Nucleus admin gui). |
||
|
|
|||
|
Monkeybrain Nucleus PhD Joined: 15 Dec 2005 Posts: 525 Location: Kristiansand, Norway |
Great explanation there ftruscot Cleared a thing or two for me too Should be sticky'ed somewhere?? _________________ Is your question not solved yet? Search our FAQ, read the Documentation, or browse the list of available plugins. |
||
|
|
|||
|
roel Nucleus Guru ![]() Joined: 16 Apr 2002 Posts: 4575 Location: Rotterdam, The Netherlands |
Sticky. _________________ Is your question not solved yet?
|
||
|
|
|||
|
danielck Nucleus PhD ![]() Joined: 15 Dec 2005 Posts: 668 |
or FAQ it? |
||
|
|
|||
|
Esteban_Panzera Nucleus Newbie Joined: 31 Jul 2006 Posts: 6 |
better faq it, I was looking for this some days ago didn't find it at the faqs and didn't mind looking at the forum _________________ LAO Directory Ambatchdotcom Seocontest |
||
|
|
|||
|
|
|||
|
All times are GMT + 1 Hour
You cannot post new topics in this forum |
|||