Thanks very much karichen and Altair4 for your replies. You've shone some very helpful light on some salient aspects I was not aware of and I can explore these and see where they lead.
So, just as when a new user is added to the system...
**when a user creates a new file that file will belong to the user and the file will also belong to or be assigned to a group which is the primary group of that user (also of the same name as the username).
**You can have groups which are named the same as a user or owner of a file and groups which are not. It is good practice, if you are giving others access to a shared directory, to create another group
other than the primary group of the user/owner. This is in case your permissions are set for that primary group in such a way as to allow members access to other directories the primary group can access also.
My use of a sales team scenario perhaps did not help my cause as it couldn't be further from my reality. And I definitely chose a poor file permissions example to use where
group and
others permissions were the same.
In fact my problem arose when I took the website I built off-line on a windows machine and put it live onto a linux server. My website uses PHP (I wrote) to take user input to either add content to existing pages or create new webpages which can then take user input to add content to existing webpages. It's an incredibly rudimentary, amateurish, rambling server-side script which I'm quite proud to have worked out myself in my spare time. However because I didn't or don't yet understand permissions the website security was appallingly lacking and the site eventually fell to what I suspect might have been a cross-site scripting attack. Great fun!
I have my website up and running locally on my Linux system. I had to be logged in as root to copy the files to /var/www and then I had to change the ownership of /var/www and all files and folders recursively by using
I think this is the name the apache server uses for owner and group.
So far so good. But occassionally I want to manually add pages (as root)(which contain php scripts which create new pages or new content in existing pages) and this is where the scripts stop working because of the conflicting file permissions I think, well the php error reports mention permissions...
I've bogged myself down again in particulars. My original request was for help in a general/conceptual understanding of permissions and groups...
I can tackle these particulars afresh armed with the new insights you have provided me with. Perhaps even take the website live again. Thanks again!