There are several ways to go, and I wish to find out about them.
I have a file on our ad server. I have root access for the server, and wish to copy over a file to our ad NAS.
The file is owned by a different user on the ad server with -rw-r--r--
.
I have no problem to scp the file to my own node's /home/user
.
I assume there are different ways to copy to the NAS. I tried with mounting the NAS both to my /mnt
and /media
folder.
I ran scp centosminpuppet64-64.box user@ip:/media/iso
and ended up with permission denied. This was a try to copy it to my agent with the NAS mounted as:
sudo mount -t cifs -o credentials=/home/nicox/.smb //10.101.0.2/Groups/ /media/iso/
When NAS is mounted agents, /media/iso
are, permissions of the NAS are:
drwxr-xr-x 0 root root
Is there a way to workaround this, by changing permissions and ownerships?
I have an own user and password for our Samba
NAS itself.
All our nodes are on the 10.101.x.x network.
This is how the NAS is set:
10.101.0.2/Groups
10.101.0.2/Users/my_user
OK, your issue is that you are mounting the NAS locally in a directory owned by
root
to which regular users have no access:To allow everybody to write to that directory, you need to run
You should probably also mount the NAS with the
users
option: