I have a RHEL 5.7 system with a cifs mount from a Windows 2007 file server that I need to fix the permissions on. Once the share is mounted the permission for the mount are 777. I need to change that to 770 on the top level directory and to 640 on the sub-directory .ssh/. But when I run chmod against it I get a permission denied error.
This is the line in my /etc/fstab file:
Quote:
//dvvn-mp-nas.lamar.edu/bmt_edi /home/srv_bmt_edi cifs rw,credentials=/etc/bmt_edi_cred.txt,uid=516,gid=522 0 0
The "credentials file contains the username and password used to authenticate to the file server. I associate it to a particular user/group on the RHEL system with the gid/uid options.
This is what the permissions look like after it's mounted:
Quote:
[root@mgmtprod01r5v ~]# ls -lha /home/ | grep srv_bmt
drwxrwxrwx 1 srv_bmt_edi srv_bmt_edi 12K Feb 19 14:14 srv_bmt_edi
and
[root@mgmtprod01r5v ~]# ls -lha /home/srv_bmt_edi/
total 224K
drwxrwxrwx 1 srv_bmt_edi srv_bmt_edi 12K Feb 19 14:14 .
drwxr-xr-x 23 root root 4.0K Dec 4 11:08 ..
drwxrwxrwx 1 srv_bmt_edi srv_bmt_edi 0 Feb 9 11:28 .ssh
As you can see, the perms are set to 777. I need to change these to 770 for /home/srv_bmt_edi/, I need to change my /home/srv_bmt_edi/.ssh/ sub-directory perms to 700 and I need to change the perms for my .ssh/authorized_keys file to 640. But when I try I get a permission denied error:
Quote:
[root@mgmtprod01r5v ~]# chmod 770 /home/srv_bmt_edi/
chmod: changing permissions of `/home/srv_bmt_edi/': Permission denied
I had this same share mounted as an smbfs share on a RHEL 4 box and it worked well. I'm sure it has something to do with my mount options but for the life of me I can't see what I'm doing wrong. Any help would be very much appreciated.