1

I am trying to change the ownership of a file on a remote filesystem, but chown responds with

chown: changing ownership of ‘foo’: No such file or directory

However, as you can see, foo is there and I can do other operations on it. For example, sudo chmod a+x foo works just fine. E.g.,

prompt> ls -l foo
-rw-rw-r-- 1 debug debug 0 Dec  4 09:45 foo
prompt> sudo chmod a+w foo
prompt> ls -l foo
-rw-rw-rw- 1 debug debug 0 Dec  4 09:45 foo
prompt> sudo chown seth foo
chown: changing ownership of ‘foo’: No such file or directory
prompt> ls -l foo
-rw-rw-rw- 1 debug debug 0 Dec  4 09:45 foo

The directory lives on a remote drive mounted as follows:

sudo mount //10.71.165.126/seth /mnt/centraldrive -o user=name,pass=password

The remote filesystem is a seagate central. I am running Ubuntu 14.04.1 LTS.

Any help would be appreciated.

[A side note, I created foo with sudo touch foo. However, for some reason the ownership is given the the debug user. Is that related?]

3
  • Are you wanting to change the permissions on the Seagate or the local mount point? And are you using valid login credentials for the Seagate in your mount command rather than you local machine credentials? Makes a difference.
    – douggro
    Dec 4, 2014 at 15:38
  • Mount command is using credentials for seagate. Trying to run chown on the seagate.
    – seth
    Dec 4, 2014 at 19:49
  • If you want to change permissions on the Seagate, you'll have to ssh into it and change them there. You're creating a mount point for the Seagate locally in /mnt/centraldrive and file permissions won't "stick" there unless you create a directory in /mnt and specifically mount the Seagate with an fstab entry that contains the user/group assigned to the mount point.
    – douggro
    Dec 4, 2014 at 20:38

1 Answer 1

1

Following the suggestion of douggro I was able to get things done properly, even without an entry in fstab:

sudo mount -t cifs //ip-adr-of-seagate/user /mnt/centraldrive -o username=user,pass=password,uid=1000,gid=1000,iocharset=utf8,sec=ntlm,file_mode=0777,dir_mode=0777

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .