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 02-02-2004, 05:23 AM   #1
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 952

Rep: Reputation: 32
permissons rights


I have white box, two pc running

added a new user to the system, trying to give my self access to write to /var/www/html using a FTP etc...

So what i did was

[root@www root]# chown -R user_name /var/www/html

[root@www html]# ls -al
total 8
drwxr-xr-x 2 User_name root 4096 Feb 2 18:12 .
drwxr-xr-x 8 root root 4096 Feb 3 2004 ..

I am able to write to the directory, make other folders etc.

I dont know if this is right.

can any one fill me in please.


Old 02-02-2004, 06:29 AM   #2
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
One solution is creating a group specifically for users who should be able to create files and directories in /var/www/html.

All commands below are to be executed as root.
1. Create the group: groupadd webbies
This will create a group called webbies. You can name it whatever you want but I find that having non-professional sounding names can help you remember what groups you have creaetd yourself and what ones came with the distribution. Not that it matters much though.

2. Change ownership of /var/www/html and subdirectories: chown -R root.webbies /var/www/html

3. Make sure the webbies group members have write access everywhere in /var/www/html: chmod -R g+rw /var/www/html/*

4. Finally, add yourself and anyone that should have write access there to the webbies group (or whatever you chose to call your group). Open up /etc/group and find the line that begins with webbies, like this:
After the last colon you can add a comma-separated list of users:
Users don't become members until they have logged in the next time (so log out and then log in again). Type groups to see a list of groups you are member of.


Last edited by hw-tph; 02-02-2004 at 06:31 AM.
Old 02-02-2004, 06:47 AM   #3
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 952

Original Poster
Rep: Reputation: 32
Thank you.

thats the way i was going it before adding a new user then a group called gateway, i added my user to that group then i did the following but i was told it was wrong.

chgrp –R gateway /path/to/gatewayfiles’


chown –R root.gateway /path/to’
chmod –R g+rw /path/to

but hey it worked, any way is the above one i did ok to use like that .



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
Permissons of directory Permaximus Linux - General 5 11-05-2005 05:21 PM
Changeing permissons jmanjeff Debian 3 04-01-2005 11:48 AM
Konsole permissons atrain Linux - General 3 11-29-2004 12:21 PM
Proftp permissons Haiyadragon Linux - General 0 09-13-2004 09:28 AM
awstats permissons tommytomato Linux - General 0 06-14-2004 12:52 AM > Forums > Linux Forums > Linux - Newbie

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

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