LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   samba drive permission denied (https://www.linuxquestions.org/questions/linux-general-1/samba-drive-permission-denied-609167/)

yusufs 12-26-2007 04:31 AM

samba drive permission denied
 
Hai all,

As root, Mounted a windows dir using samba in my RHEL ES 4.0 box ..

like

mount -t smbfs -o username=dba //192.168.0.84/archive /mnt/archive

and password is given and successfully mounted..

problem is that only root user can write to this directory and not others and I tried changing the directory permission and even tried changing the ownership.. when an normal user is trying like :


[oratest@oracle ~]$ touch /mnt/archive/new1.txt
touch: cannot touch `/mnt/archive/new1.txt': Permission denied

How can I resolve this ?


Yusuf

DinoFly 12-26-2007 04:45 AM

Quote:

Originally Posted by yusufs (Post 3001710)
Hai all,

As root, Mounted a windows dir using samba in my RHEL ES 4.0 box ..

like

mount -t smbfs -o username=dba //192.168.0.84/archive /mnt/archive

and password is given and successfully mounted..

problem is that only root user can write to this directory and not others and I tried changing the directory permission and even tried changing the ownership.. when an normal user is trying like :


[oratest@oracle ~]$ touch /mnt/archive/new1.txt
touch: cannot touch `/mnt/archive/new1.txt': Permission denied

How can I resolve this ?


Yusuf

Hi Yusuf is 192.168.0.84 your machine? You should check permisions on //192.168.0.84/archive.

yusufs 12-26-2007 05:19 AM

Quote:

Originally Posted by DinoFly (Post 3001720)
Hi Yusuf is 192.168.0.84 your machine? You should check permisions on //192.168.0.84/archive.



Thanks Dino,

192.168.0.84 is my machine..

I've given complete full rw access to all the users.. but as root users I can able to rw on the mounted drive /mnt/archive.. but not as other users..


Any comments ?

Yusuf

alkos333 12-26-2007 07:40 AM

If you want to allow the regular user to access the files add the following to your -o flag: "uid=<user>,gid=<group"

yusufs 12-27-2007 02:19 AM

Quote:

Originally Posted by alkos333 (Post 3001832)
If you want to allow the regular user to access the files add the following to your -o flag: "uid=<user>,gid=<group"



Thanks alkos,, but the following command failed :


mount -t smbfs -o flag:uid=oratest,gid=501 username=dba//192.168.0.84/archive /mnt/archive

Do I have to make any changes ?.. if so, where.. where can I add rw in this command..


Please clarify


Thanks
Yusuf

alkos333 12-28-2007 01:43 PM

Code:

mount -t smbfs -o uid=oratest,gid=501,username=dba //192.168.0.84/archive /mnt/archive
Also, post the errors you get - that helps to clarify things quite a bit.

yusufs 12-29-2007 12:48 AM

Quote:

Originally Posted by alkos333 (Post 3004075)
Code:

mount -t smbfs -o uid=oratest,gid=501,username=dba //192.168.0.84/archive /mnt/archive
Also, post the errors you get - that helps to clarify things quite a bit.



Thanks Alkos,

it worked fine .


root@oracle oracle]# mount -t smbfs -o uid=oratest,gid=501,username=dba //192.168.0.84/archive /mnt/archive
params.c:Parameter() - Ignoring badly formed line in configuration file: set path
Password:

Thanks
Yusuf


All times are GMT -5. The time now is 04:31 AM.