LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   directory and file permissions (https://www.linuxquestions.org/questions/linux-newbie-8/directory-and-file-permissions-4175499398/)

alain.roger 03-25-2014 09:14 AM

directory and file permissions
 
Hi,

under fedora 20 i would like to setup a webserver for testing purposes.
everything is ok and /var/www/html is the directory where all websites should be stored and developed.

1. however with one of my friend we would like to work together from 2 different computers, so as /var/www/html is owned by root:root, what is the best method to allow both of us (let's say "dev1", "dev2" fedora accounts) to create, modify, delete files and directories in this web root (/var/www/html) ?

2. should i create a group and add those 2 accounts into it ?

thx.

A.

kkoene 03-25-2014 09:23 AM

#2 is how I would go about working the issue. Setup a group called something like devgrp (original..I know...) and put both accounts into it.

jpollard 03-25-2014 05:02 PM

It really depends on what you are trying to do.

You could even use the public_dir entry and provide the files from within your home directory.

The advantage is ease of editing and testing things. When finished, the files could then be moved to somewhere more permanent.

joe_2000 03-25-2014 05:15 PM

I personally bind-mount the project dir in my home to /var/www for testing purposes on my local computer. (In your case that would be any sensible shared directory you both have access to.)
In combination with that I am closing port 80 by iptables to be on the safe side...

Works very nicely...

Habitual 03-25-2014 08:54 PM

Quote:

Originally Posted by kkoene (Post 5140912)
#2 is how I would go about working the issue. Setup a group called something like devgrp (original..I know...) and put both accounts into it.

Insufficient. They'd have to chown the /var/www/html to "apply" the devgrp to it.
make backups of /var/www/html first and you could:
Code:

chown -R root:devgrp /var/www/html/*


All times are GMT -5. The time now is 01:56 AM.