LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-15-2015, 08:21 PM   #1
wh33t
Member
 
Registered: Oct 2003
Location: Canada
Posts: 922

Rep: Reputation: 61
Cool Create a New User with home dir set to /var/www/html/?


Hi LQ,

I have to give access to a web designer to /var/www/html/. I don't use or want FTP installed so I wanted to create a new user called designer and set their home directory to /var/www/html.

1. Will this somehow change the ownership and permissions of the files and directories /var/www/html to designer?

2. Is there anyway I can sandbox this account to only be able to see/read/write inside of /var/www/html

Thanks for your advice.
 
Old 07-15-2015, 09:11 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,307
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
I don't know whether you could make /var/www/html his home directory, but that strikes me as a less than optimal approach. You could softlink to /var/www/html from his /home directory and give him read-write permissions to /var/www/html, but I'd have to research the best way to give him the requisite permissions--it's not something I know off the top of my head. Perhaps someone who does know that will look in on this thread.

Last edited by frankbell; 07-15-2015 at 09:17 PM.
 
1 members found this post helpful.
Old 07-15-2015, 09:44 PM   #3
wh33t
Member
 
Registered: Oct 2003
Location: Canada
Posts: 922

Original Poster
Rep: Reputation: 61
Quote:
Originally Posted by frankbell View Post
I don't know whether you could make /var/www/html his home directory, but that strikes me as a less than optimal approach. You could softlink to /var/www/html from his /home directory and give him read-write permissions to /var/www/html, but I'd have to research the best way to give him the requisite permissions--it's not something I know off the top of my head. Perhaps someone who does know that will look in on this thread.
How would I go about softlinking like that? I've heard of linking but never done it before.
 
Old 07-16-2015, 02:17 AM   #4
wh33t
Member
 
Registered: Oct 2003
Location: Canada
Posts: 922

Original Poster
Rep: Reputation: 61
Ok, I've created a symbolic link for the designers home dir to the /vaw/www/html/ but when I log in as that user I can't edit any of the files.

Do I want to add the designer user to www-data group? Would that give it read/write/create permissions?
 
Old 07-16-2015, 02:50 AM   #5
wh33t
Member
 
Registered: Oct 2003
Location: Canada
Posts: 922

Original Poster
Rep: Reputation: 61
I solved it by making a group called webedit, adding the new user and www-data to the group, then changing the ownership of the web directory to the webedit group, then changed the permissions so that webedit could edit the files. Viola! All working now. Thanks for the help.
 
  


Reply

Tags
/var/www/html, newuser


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
How do I give access to an ftp user to the var/www/html dir shootinstr8 Linux - Newbie 1 10-13-2006 03:32 AM
Whenever I create a file in /var/www/html/, it is at permission 600 (forbidden) Josh1billion Linux - Software 4 03-18-2006 10:24 PM
apache 403 for dir in /var/www/html/ m3rajk Linux - Networking 7 10-11-2005 01:31 PM
user`s www dir in his home directory spotass Linux - Newbie 0 06-12-2004 01:57 AM
user/group permissions for /var/www/html/ illtbagu Linux - Software 6 11-12-2003 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:15 AM.

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