About mount purposes
If the client and server are both Linux (Ubuntu), and assuming that the user in the server is omicron
with uid 1007 gid 1007
the following command is viable to be executed in the client:
sudo mount -t cifs //192.168.1.X/samba_alias
/mnt/192.168.1.X/directoryname
-o username=omicron,
rw,
uid=1007,
gid=1007
uid
and gid
are mandatory to be the same than omicron in the server otherwise is not possible create anything in the mounted directory. So, because any new files created from the client have the same uid and gid than the server's user, then the server can use them without any problem.
If the server is MacOS and client Ubuntu.
If through the GUI is used smb://hostname/directorynameshared
, it is mounted, and is possible create anything and execute any script, it in:
*$XDG_RUNTIME_DIR/gvfs/smb-share:server=hostname,share=directorynameshared
The unique disadvantange is that in the server is not possible edit/access that new content because the user/groups are not the same, it is solved with chown
in the server side. Anyway the directory is unmounted later.
Now, the reason of this post, if the following is used (Ubuntu to MacOS) - user in the server is omicron
with uid 505 gid 507
:
sudo mount -t cifs //192.168.1.X/directorynameshared
/mnt/192.168.1.X/directoryname
-o username=omicron,
rw,
uid=505,
gid=507
Is possible execute the scripts, but is not possible create new content:
mkdir: cannot create directory ‘xyz’: Permission denied
How solve this situation?