cannot create regular file permission denied
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.
Related videos on Youtube
aquagremlin
Updated on September 18, 2022Comments
-
aquagremlin over 1 year
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 over 7 yearssorry that was a typo. Thanks for catching it. typo fixed.
-
-
Tigger over 7 yearsWas just in the process of writing this :]