I inherited a legacy LAMP web application on a CentOS7 server. 3 separate CIFS file servers were mounted with with following /etc/fstab and bind mounts were used to simulate local directory trees the app was already configured to work with.
# SMB Mounts
//website-files/sites /mnt/website-files cifs x-systemd.requires=nslcd.service,vers=1.0,credentials=/root/.local/smbcred,noperm,noserverino,_netdev 0 0
//files/jobs /var/private/job/files cifs x-systemd.requires=nslcd.service,credentials=/root/.local/smbcred,vers=1.0,noperm,noserverino,_netdev 0 0
//data/jobs /var/private/job/data cifs x-systemd.requires=nslcd.service,credentials=/root/.local/smbcred,noperm,noserverino,_netdev 0 0
//data/incoming /var/private/incoming cifs x-systemd.requires=nslcd.service,credentials=/root/.local/smbcred,vers=1.0,noperm,noserverino,_netdev 0 0
# Bind Mounts
/mnt/website-files/test/website/files /var/www/sites/website.com/files none x-systemd.requires=/mnt/website-files,rw,bind,_netdev 0 0
/mnt/website-files/test/website/preview /var/www/preview none x-systemd.requires=/mnt/website-files,rw,bind,_netdev 0 0
/mnt/website-files/test/website/private /var/private none x-systemd.requires=/mnt/website-files,rw,bind,_netdev 0 0
After 2 years of uptime, the server was rebooted. When it came back up, the app did not work as expected, having sporadic read write issues. Personally I believe admins during that time made changes to accommodate various business needs, but those were never reflected in /etc/fstab or documented.
In any case, I want to rebuild the missing functionality and make sure the /etc/fstab options reflect that. I'm experimenting with the following direction, but still see read write issues in the trees.
sudo mount -t cifs -o username=${USER},password=${PASSWORD},dom=${DOMAIN}, uid=<user>,gid=<group> //server-address/folder /mount/path/on/centos7
First, can CIFS, or CIFS vers. 1.0, be configured so that Linux can manage the directory trees using chown, chmod, etc? I see noperms in the original config.
If it can manage ownership and permissions with native Linux commands, can't I apply those post-mount with chown / chmod -R, or do I have to specify file_mode and dir_mode options explicitly in the options?
Finally, can I avoid the mount option 'noperm' or could that be included because it's as a limitation of the version 1.0?