Home Directory permission

I

invincible123

Guest
Hi,

I am facing problem with home directory permissions whenever I add a new user.

Code:
liuc@msvlsi66:~> su -
Password:
msvlsi66:~ # useradd -g users -d /export/home/test2 -m test2
useradd: Warning: chown on `/export/home/test2' failed: Invalid argument
Cannot change owner/group for `/export/home/test2': Invalid argument
Cannot change permissions for `/export/home/test2/.config': Invalid argument
Cannot change permissions for `/export/home/test2/.bashrc': Invalid argument
Cannot change permissions for `/export/home/test2/public_html/.directory': Invalid argument
Cannot change permissions for `/export/home/test2/public_html': Invalid argument
Cannot change permissions for `/export/home/test2/.fonts': Invalid argument
Cannot change permissions for `/export/home/test2/.profile': Invalid argument
Cannot change permissions for `/export/home/test2/.xim.template': Invalid argument
Cannot change permissions for `/export/home/test2/.bash_history': Invalid argument
Cannot change permissions for `/export/home/test2/.inputrc': Invalid argument
Cannot change permissions for `/export/home/test2/bin': Invalid argument
Cannot change permissions for `/export/home/test2/.local': Invalid argument
Cannot change permissions for `/export/home/test2/.xinitrc.template': Invalid argument
Cannot change permissions for `/export/home/test2/.emacs': Invalid argument
Cannot change permissions for `/export/home/test2/.vimrc': Invalid argument
useradd: Copying of skel directory failed.
msvlsi66:~ #

Though the home directory /export/home/test2 is created the user doesn't have permissions to create any file/folder in his own home directory.
my /export/home
Code:
drwxr-xr-x 16    1061 users  4096 Sep 23  2009 swatii
drwxr-xr-x  7 root    root   4096 Jun 11 12:06 test1
drwxr-xr-x  2 root    root   4096 Jun 12  2012 test2
drwxr-xr-x  2 root    root   4096 Jan 19 16:38 user1
drwxr-xr-x  2 root    root   4096 Jan 19 18:29 user2

please let me know how I can fix it.
we are using openSuse 12.1.

thanks
invincible123
 


What happens if you chown manually?
  • If that works there's a problem with the useradd script.
  • If not, it seems like the filesystem the home directory is copied to is causing trouble.
In the latter case, I guess the filesystem is mounted from a network server. If so...
  • You need root permissions on the server it's mounted from.
  • Be sure to check for UID/GID mismatches between server and client.
  • In case you are using NFS, it could be that NFSv4 is causing trouble. You might wanna try using NFSv3 (nfsvers=3).
 
the problem exists when I chown manually,

yes, we are using NFS.

my /etc/exports file
Code:
/ex 192.168.1.104(rw,no_root_squash,async,no_subtree_check)

output of my mount command
Code:
192.168.1.105:/export/export on /export type nfs4 (rw,relatime,vers=4,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.106,minorversion=0,local_lock=none,addr=192.168.1.105)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,relatime,user_id=0,group_id=0)

Could you please tell me how do I use nfs3?

Thank you
 
Hi,

Sorry for the late reply...

You can force the use of nfs3 by adding "nfsvers=3" to the mount options.
[edit: I also see "vers=4" in your mount options, maybe you should try changing that to 3, or replacing it with the option mentioned above]

Also, as stated before the usernames and (G)UID's on the client machine must correspond with those on the server machine.

I hope this helps.

Cheers,
Raoul
 

Members online


Latest posts

Top