Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Looking for some help here. We bought a new NAS and facing this issue. We have a few shares that use both CIFS and NFS. Users from Windows drop files in the share and from a Linux machine an NFS is mounted and Nginx process the file. The vendor suggested we set the share as "CIFS" and create user mapping from the NAS.
When I tried to change the ownership (sudo chown -R nginx:nginx /mnt/test) to "nginx" (or any user) on the Linux machine, I am getting the following error on each file.
chown: changing ownership of ‘/mnt/test/index.html’: Operation not permitted
-------------------------------------------------------
So from the NAS user mapping (unix to windows), we have the following:
root -->webuseraccount in windows
nginx -->webuseraccount in windows
NFS mount as follows:
mount -t nfs myipaddress:/vol_digital /mnt/test
cat /proc/mounts show the volume as RW.
Any advice would be appreciated.
TT
Last edited by trackstar2000; 09-25-2017 at 08:08 PM.
mount -t cifs -o username=<webuseraccount>,password=<password>,uid=<UID>,gid=<GID> //<nas>/<directory> /mnt/test/BirstMetaData
The UID would be whatever numeric ID nginx has in /etc/passwd. The GID can be the primary for nginx or another group ID number. The "//<nas>/<directory>" is the the same URI used when you mount this share to Windows (reversing "" to "/" for Linux). Once mounted all files in /mnt/test will have nginix as owner.
In /etc/fstab that would be:
//<nas>/<directory> /mnt/test cifs username=<webuseraccount>,password=<password>,uid=<nginx numeric UID from /etc/passwd>,gid=<whatever group ID> 1 4
mount -t cifs -o username=<webuseraccount>,password=<password>,uid=<UID>,gid=<GID> //<nas>/<directory> /mnt/test/BirstMetaData
The UID would be whatever numeric ID nginx has in /etc/passwd. The GID can be the primary for nginx or another group ID number. The "//<nas>/<directory>" is the the same URI used when you mount this share to Windows (reversing "" to "/" for Linux). Once mounted all files in /mnt/test will have nginix as owner.
In /etc/fstab that would be:
//<nas>/<directory> /mnt/test cifs username=<webuseraccount>,password=<password>,uid=<nginx numeric UID from /etc/passwd>,gid=<whatever group ID> 1 4
I thought about this a while ago (mounting as CIFS). Wouldn't the password be stored and considered not secure?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.