Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-25-2014, 09:14 AM   #1
LQ Newbie
Registered: Mar 2014
Posts: 1

Rep: Reputation: Disabled
Question directory and file permissions


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 ?


Old 03-25-2014, 09:23 AM   #2
Registered: May 2008
Location: Wisconsin
Distribution: Fedora, Ubuntu, RHEL, AIX6
Posts: 33

Rep: Reputation: 0
#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.
Old 03-25-2014, 05:02 PM   #3
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,707

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
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.
Old 03-25-2014, 05:15 PM   #4
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 824

Rep: Reputation: 237Reputation: 237Reputation: 237
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...
Old 03-25-2014, 08:54 PM   #5
LQ 5k Club
Registered: Jan 2011
Location: Nowhere near you, thank God.
Distribution: OSX Sierra
Posts: 8,568
Blog Entries: 14

Rep: Reputation: Disabled
Originally Posted by kkoene View Post
#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:
chown -R root:devgrp /var/www/html/*
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
file/directory permissions mianmajidali Linux - Server 1 10-08-2009 10:35 AM
File permissions v. directory permissions Completely Clueless Linux - Newbie 7 07-09-2009 08:33 AM
File/Directory Permissions waynevnc Debian 1 05-23-2005 04:23 PM
File and Directory permissions plasmapudding Red Hat 3 09-09-2003 10:26 AM
Directory and file permissions ryan Linux - Security 2 12-06-2000 12:46 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:37 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration