cannot change owner of cifs mount on linux [message #357862] |
Thu, 06 November 2008 23:31 |
ranvijaidba
Messages: 71 Registered: May 2008 Location: Bangalore
|
Member |
|
|
We are configuring NAS device on linux for RAC installation.
ISSUE:
I had mounted NAS device to Linux server.As root
user I can create directory but cannot change owner of cifs mount.It say permission denied.When I try to change permission it doesn't work.The mount point show the uid and gid as 33 and permissions drwxr-xr-x
I had mounted using the following command
#mount -t cifs storage:/ocr1 /u02/ocr1 -o username=XXXX,password=XXXX,uid=oracle,gid=dba
Permission denied
[root@SSIPL-WRKST-116 u02]# chown -R oracle:dba ocr1
chown: changing ownership of `ocr1': Permission denied
chown: changing ownership of `ocr1/ss': Permission denied
[root@SSIPL-WRKST-116 u02]#
Change owner
[root@SSIPL-WRKST-116 u02]# ls -lrt
total 0
drwxr-xr-x 3 33 33 0 Dec 4 2006 ocr1
[root@SSIPL-WRKST-116 u02]# chmod -R 777 ocr1
[root@SSIPL-WRKST-116 u02]# ls -lrt
total 0
drwxr-xr-x 3 33 33 0 Dec 4 2006 ocr1
[root@SSIPL-WRKST-116 u02]#
|
|
|
|
Re: cannot change owner of cifs mount on linux [message #529835 is a reply to message #526863] |
Thu, 03 November 2011 05:21 |
arunbulls
Messages: 1 Registered: March 2008
|
Junior Member |
|
|
1. Change mount point owner to your user other than root
As per my requirement it is oracle
# chown oracle:oinstall linuxdir
2. Change permission to mount
# chmod 6555 mount
-rwsr-sw-x mount
3. To run sudo as user 'oracle' edit sudo conf file
# visudo
oracle all=(root) all
Add above mentioned line
4. Now Run from user (oracle)
oralcle@server#sudo mount -t cifs //systemname/share /mnt/linuxdir -0 username=oracle,password=sdfsdf,uid=oracle,gid=oinstall
5. Now you can see the change in owner name to your mounted windows shared directory.
|
|
|