0

I'm on Debian 5, I want to move files, but I'm getting a permission denied error, even if I'm root.

Do you have any solutions?

-rw-rw-rw- 1 scusr scusr 49901 Jun 17 09:04 flux_outfacture_130617090229UN_Test_888880617014310001.pdf

$ mv flux_outfacture_130617090229UN_Test_888880617014310001.pdf flux_out/facture_130617090229UN_Test_888880617014310001.pdf

mv: cannot move flux_outfacture_130617090229UN_Test_888880617014310001.pdf' to flux_out/facture_130617090229UN_Test_888880617014310001.pdf': Permission denied

slm
  • 7,355
  • 16
  • 54
  • 72
user178990
  • 11
  • 3
  • 1
    Is the directory NFS-mounted or mounted read-only? – Jenny D Jun 24 '13 at 14:25
  • 2
    What is the output of `lsattr -d flux_out` ? What is the output of `ls -ld flux_out` ? – user9517 Jun 24 '13 at 14:26
  • 1
    Just a reminder, stop using debian 5 and migrate as soon as you can : "Debian GNU/Linux 5.0 has been superseded by Debian 6.0 ("squeeze"). Security updates have been discontinued as of February 6th, 2012" –  Jun 24 '13 at 16:27

1 Answers1

2

Are you in a NFS share? then depending on how that server is configured you might get root squashed. This may also apply to other remotely mounted file systems.

If nfs, check if the fs is exported with the root_squash option, or else if it is mounted with the no_root_squash (to allow root to remain root even when accessing the exported fs)

from wikipedia:

Root squash[2][3] is reduction of the access rights for the remote superuser (root) when using identity authentication (local user is the same as remote user). It is primarily the feature of NFS but potentially may be available on other systems as well.

Petter H
  • 3,383
  • 1
  • 14
  • 18
  • Thank you for your answer. Yes i am on a NFS share. – user178990 Jun 24 '13 at 16:17
  • Here is the result of lsattr -d flux_out lsattr -d flux_out lsattr: Inappropriate ioctl for device While reading flags on flux_out I can cp files in flux_out, but i can't move or delete files in the sources directory. How can i know is there is the root_squash option ? – user178990 Jun 25 '13 at 07:27
  • On some systems `showmount -e` on the NFS server will show options. I'd double check with `man showmount` first though to verify ... – Petter H Jun 25 '13 at 15:08