Forum Discussion

dbeck's avatar
dbeck
Level 5
15 years ago

Errno = 13: Permission denied


All,

Created to mount point directories for backps.  First directory is called data_backup,  Second is called home_backup.

Gave both directories full root permissions  using chmod 777.  When executing ls -alt, boot directories show (drwxrwxrwx  2 root root 4096)

Then after mounting and executing ls -alt again,  the directory data_backup shows (drwxrwxrwx  145 root bin 17408) and backs up with no permission errors.  However, the directory home_backups shows (drwxr-xr-x 79 root users 3072) and gives the error (Errno = 13: Permission denied) when running the job.  Have tried the umount to set permissions, but when mounting home_backup again, permissions are still (drwxr-xr-x 79 root users 3072).   Please advise.

Dave






  • From the man page for share_nfs one of the -o options is:

    root=access_list    Only root users from the hosts specified in access_list  will  have  root  access....By default, no host  has root access, so root users are mapped to an anonymous user ID.

    So even tho' you are root on the target server you are essentially "anonymous" as far as the source server is concerned & so only have those effective permissions.

    Using share with the option -o root=target_server (i.e. your master) should give you the necessary rights for the backup to work without having to change any permissions directly.

    Beware - this DOES give effective root permission so any changes made on the nfs mount regarding file or directory access will also be effective on the source server. I would advise speaking to your server admin prior to attempting this (unless that's you of course!)

    Alternatively, you could set the UID of the anon user to be 0:
    anon=uid   Set  uid to be the  effective  user  ID  of  unknown  users.  By  default, unknown users are given the effective user ID UID_NOBODY. If  uid is set to -1, access is denied.

    PS: this is effectively out of scope of NB and will effectively make the source server somewhat less secure.

16 Replies