2

I have a NAS whose ip is 192.168.1.7 There is a share on the NAS named music and in that share is a folder named 'archives'.

I want to copy a file from my local hard drive /data/favourites/my-web-radio to the folder named archives.

To avoid permission issues , I made myself root with 'su root'. Then I made a directory in /mnt

mkdir /mnt/archive

I checked to make sure the directory has read/write privs and it does:

drwxr-xr-x 2 root root 4096 Jan 26 00:35 archive

I mounted the share

mount -t cifs //192.168.1.7/music/archives/ /mnt/archive/

The permissions are these:

drwxrwsrwx   3 1024 users     0 Jan  2 01:28 archives

Don't know why it lists the owner as 'users' since i made it when i was root.

Then I tried

root@volumio:/mnt# sudo cp /data/favourites/my-web-radio /mnt/archive/

and got

cp: cannot create regular file ‘/mnt/archive/my-web-radio’: Permission denied

Obviously, I used root because I had the same problem even when I used the default admin login account.

I've read the numerous threads and they all seem to point to an issue with ownership. I tried to change ownership but was unsuccessful

sudo chmod -R 777 /mnt/archive/
chmod: changing permissions of ‘/mnt/archive/’: Permission denied

I would appreciate some enlightenment.

aquagremlin
  • 131
  • 1
  • 1
  • 5

1 Answers1

1

figured it out:

sudo mount -t cifs -o username=userId_on_NAS,password=user_pass //192.168.1.7/music/archives /mnt/archives/

scp /data/favourites/my-web-radio /mnt/archives

I needed to mount the NAS share with the userId that has write privileges on the NAS.

aquagremlin
  • 131
  • 1
  • 1
  • 5