creating directories

I am trying to create a directory in my 'home' directory with my user login. However I can only create a directory as a root user and thus can't use it with my user login. I can use the 'gun' directory in 'home' with my user login. Any help would be appreciated. [gun(a)LinuxBox home]$ mkdir adelle mkdir: cannot create directory `adelle': Permission denied [gun(a)LinuxBox home]$ su Password: [root(a)LinuxBox home]# mkdir adelle [root(a)LinuxBox home]# exit exit [gun(a)LinuxBox home]$ ls -ld drwxr-xr-x 5 root root 4096 May 12 08:55 . [gun(a)LinuxBox home]$ cd gun [gun(a)LinuxBox gun]$ ls -ld drwx------ 25 gun gun 4096 May 12 08:54 . [gun(a)LinuxBox gun]$ cd .. [gun(a)LinuxBox home]$ ls -ld adelle drwxr-xr-x 2 root root 4096 May 12 08:55 adelle [gun(a)LinuxBox home]$

On 12/05/2004, at 9:36 AM, Gun Caundle wrote:
I am trying to create a directory in my 'home' directory with my user login. However I can only create a directory as a root user and thus can't use it with my user login. I can use the 'gun' directory in 'home' with my user login. Any help would be appreciated.
What is the ownership of the 'gun' directory. Do a list (ls -lF) on /home and check ownership of gun. If it is root that explains your problems. It should belong to the user, which I presume is 'gun.' The command for changing ownerships is chmod. Just a check. You do realise that home directories for a user account by name 'user' is at the location '/home/user' and not at '/home' ?? Michael.

On 12/05/2004, at 10:04 AM, Perry Lorier wrote:
It should belong to the user, which I presume is 'gun.' The command for changing ownerships is chmod.
er, chown to change ownership. changing permissions is chmod. It's farr to early in the morning to be answering emails ;)
Oops. Indeed, it is far too early. Think I'll go back to bed. Michael.

Gun Caundle wrote:
I am trying to create a directory in my 'home' directory with my user login. However I can only create a directory as a root user and thus can't use it with my user login. I can use the 'gun' directory in 'home' with my user login. Any help would be appreciated.
As you can see, when you created the 'adelle' directory you created it as the root user, because a user cannot write to /home. What I think you really wanted to do was create an adelle user, along with a home directory. As root, remove the directory you created, and run 'adduser adelle'; this might ask you some questions, if it doesn't you will need to run 'passwd adelle' to set up a password for the account. If you want her to be able to use Samba too, use 'smbpasswd -a adelle' to add her a Samba account. Then, there will be an adelle directory which is owned by adelle; if you want to be able to write to that as gun, you can either set it so anyone can write, or you can add yourself to the 'adelle' group. (I can't remember the Fedora syntax off the top of my head, but start with 'man groupadd'. Craig

Craig Box wrote:
Gun Caundle wrote:
I am trying to create a directory in my 'home' directory with my user login. However I can only create a directory as a root user and thus can't use it with my user login. I can use the 'gun' directory in 'home' with my user login. Any help would be appreciated.
As you can see, when you created the 'adelle' directory you created it as the root user, because a user cannot write to /home.
What I think you really wanted to do was create an adelle user, along with a home directory.
As root, remove the directory you created, and run 'adduser adelle'; this might ask you some questions, if it doesn't you will need to run 'passwd adelle' to set up a password for the account. If you want her to be able to use Samba too, use 'smbpasswd -a adelle' to add her a Samba account.
Then, there will be an adelle directory which is owned by adelle; if you want to be able to write to that as gun, you can either set it so anyone can write, or you can add yourself to the 'adelle' group.
(I can't remember the Fedora syntax off the top of my head, but start with 'man groupadd'.
Craig
If you add yourself to the adelle group or another common group that you could create for the purpose of sharing files. You still probably won't be able to write adelle's files because usually the group write permission is off by default. You can fix this with the umask setting, see man umask. If you want bidirectional writeable file sharing then you need to add the users to each others groups. If this is a pain because you have many users then you could create a separate group for this purpose. You would also have to set the main group for each user to be this group and change the umask. g -- Glenn Ramsey <glenn(a)componic.co.nz> 07 8627077 http://www.componic.co.nz

Gun Caundle wrote:
I am trying to create a directory in my 'home' directory with my user login. However I can only create a directory as a root user and thus can't use it with my user login. I can use the 'gun' directory in 'home' with my user login. Any help would be appreciated.
[gun(a)LinuxBox home]$ mkdir adelle mkdir: cannot create directory `adelle': Permission denied [gun(a)LinuxBox home]$ su Password: [root(a)LinuxBox home]# mkdir adelle [root(a)LinuxBox home]# exit exit [gun(a)LinuxBox home]$ ls -ld drwxr-xr-x 5 root root 4096 May 12 08:55 . [gun(a)LinuxBox home]$ cd gun [gun(a)LinuxBox gun]$ ls -ld drwx------ 25 gun gun 4096 May 12 08:54 . [gun(a)LinuxBox gun]$ cd .. [gun(a)LinuxBox home]$ ls -ld adelle drwxr-xr-x 2 root root 4096 May 12 08:55 adelle [gun(a)LinuxBox home]$
If you eant to make /home/adelle writable by user 'gun'; chown gun.gun /home/adelle If you want a new user adelle; adduser
participants (6)
-
Craig Box
-
Glenn Ramsey
-
Gun Caundle
-
Michael Cree
-
Perry Lorier
-
zcat