Permission denied issue on a Shared drive


 
Thread Tools Search this Thread
Operating Systems Linux Permission denied issue on a Shared drive
# 1  
Old 04-04-2011
Permission denied issue on a Shared drive

Hi,
I have 2 linux servers. One of them has a mount which I have mapped to a shared samba directory on the other server. Below will help you understand better.

smb.conf on Server1:
[global]
workgroup = WRKGRP
netbios name = smbserver
security = SHARE
load printers = No
default service = global
path = /home
available = No
guest account = nobody
encrypt passwords = yes

[share]
writeable = yes
path = /mnt/landingzone/CEMP
public = yes
available = yes

[velodrome]
writeable = yes
path = /mnt/landingzone/VELODROME
public = yes
available = yes

[sdvstaging]
writeable = yes
path = /mnt/landingzone/SDVSTAGING
force user = dbadmin
public = yes
available = yes

[landingzone]
writeable = yes
path =/mnt/landingzone
public = yes
available = yes

fstab on Server2

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
//Server1/share /mnt/CEMP cifs username=dbadmin,password=#### 0 0

Below is the problem.
I get permissions denied problems on certain files when I try to access the shared directory from Server2.

On Server2:
jfverticavod01:/mnt/CEMP $ id
uid=501(dbadmin) gid=501(dbadmin) groups=501(dbadmin),504(verticadba),505(cemp) context=user_u:system_r:unconfined_t


jfverticavod01:/mnt/CEMP $ ls -lrt CEMP_VOD_ASSET_20110401.txt
-rw-r----- 1 cemp cemp 41680 Apr 2 11:00 CEMP_VOD_ASSET_20110401.txt


jfverticavod01:/mnt/CEMP $ more CEMP_VOD_SG_MAPPING_20110402.txt
CEMP_VOD_SG_MAPPING_20110402.txt: Permission denied


Can anyone help me with this? Why is id dbadmin being treated as "other user" when dbadmin is a part of the correct "cemp" group?
# 2  
Old 04-04-2011
I don't see /mnt/CEMP being exported by samba AT ALL in your configfile but I'm assuming that's a typo of some sort.

Did this group get added to that user recently? You may need to restart samba for the new privileges to take effect.

Can you access them when logged in as that user, not through samba?
# 3  
Old 04-04-2011
Hi,
The fstab on server2 has the below highlighted. So the /mnt/CEMP is mapped on fstab in Server2.
//Server1/share /mnt/CEMP cifs username=dbadmin,password=#### 0 0
Yes, when I am on Server1, I can access the file as dbadmin. I have restarted smb multiple times. The question is why am I not able to do so from Server2, as the same user?

THanks!
# 4  
Old 04-04-2011
Maybe it's not the same user in the end -- check /etc/samba/smbusers to see if the username's mapped to something else
# 5  
Old 04-05-2011
Hi,
On Server1 (which houses the data), below is the content of smbusers file. There is no smbusers file in Server2 (which is trying to access the data on Server1). Is there anything you see wrong?

[root@raplz-nb-a01 CEMP]# more /etc/samba/smbusers
# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin
nobody = guest pcguest smbguest

Thanks!

---------- Post updated 04-05-11 at 10:13 AM ---------- Previous update was 04-04-11 at 01:19 PM ----------

Any ideas to fix this? I even removed the guest account = nobody
from /etc/samba/smb.conf, and added dbadmin = dbadmin to /etc/samba/smbusers

Thanks.
# 6  
Old 04-05-2011
That's not going to help.

Maybe you can enable more debugging in Samba to see why it's refusing?
# 7  
Old 04-06-2011
OK. So, on Server2, I "cd"ed to /mnt/CEMP, Selected a file which has -rw-r----- as its permission. I tried to read it, and got the below error on smbd.log with NT_STATUS_ACCESS_DENIED errors.

Code:
[2011/04/06 08:25:20, 3] smbd/trans2.c:call_trans2qfilepathinfo(3365)
  call_trans2qfilepathinfo CEMP_VOD_SG_MAPPING_20110404.txt (fnum = -1) level=512 call=5 total_data=0
[2011/04/06 08:25:20, 3] smbd/process.c:process_smb(1083)
  Transaction 688 of length 164
[2011/04/06 08:25:20, 3] smbd/process.c:switch_message(932)
  switch message SMBtrans2 (pid 9547) conn 0x2b013cc53450
[2011/04/06 08:25:20, 3] smbd/trans2.c:call_trans2setfilepathinfo(5846)
  call_trans2setfilepathinfo(6) CEMP_VOD_SG_MAPPING_20110404.txt (fnum -1) info_level=521 totdata=18
[2011/04/06 08:25:20, 3] smbd/open.c:open_file(301)
  Error opening file CEMP_VOD_SG_MAPPING_20110404.txt (NT_STATUS_ACCESS_DENIED) (local_flags=0) (flags=0)
[2011/04/06 08:25:20, 3] smbd/error.c:error_packet_set(106)
  error packet at smbd/trans2.c(6108) cmd=50 (SMBtrans2) NT_STATUS_ACCESS_DENIED


Last edited by Yogesh Sawant; 04-09-2011 at 11:23 AM.. Reason: added code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

Permission denied

Trying to get date into the txt file. It says Permission denied. echo $(date +%I:%M:%S_%D) >> /tmp/systemd_suspend_test_err.txt exec 2>> /tmp/systemd_suspend_test_err.txt if ; then # Do the thing you want before suspend here echo "we are suspending $(date +%I:%M:%S_%D)." elif ;... (5 Replies)
Discussion started by: drew77
5 Replies

2. UNIX for Dummies Questions & Answers

Permission denied

when i run echo "User” > /dev/tty5 why do i get permission denied? :confused: (2 Replies)
Discussion started by: chinababy
2 Replies

3. UNIX for Dummies Questions & Answers

Need help to move .csv file from UNIX path to windows shared drive or c:\ drive

Hi Guys, Can any one help me on this. I need help to move .csv/.xls file from unix path to windows shared drive or c:\ drive? Regards, LKR (1 Reply)
Discussion started by: lakshmanraok117
1 Replies

4. Solaris

ISSUE : bash: cd: /rep/prok: Permission denied

Hi All, i have two accounts with acl permissions. I need to provide read access to both users. for one user s109552 "cd" is not working. drwxrws---+ 8 cvsadmin reto 1024 Aug 23 2011 reto su5sr117# su - s109553 $ bash bash-3.2$ cd /rep/reto bash-3.2$ pwd <-------- it... (2 Replies)
Discussion started by: Naveen.6025
2 Replies

5. AIX

Permission Denied issue on AIX 6.1 using Root

I have the following problem on my AIX 6.1 server. I logged in with Root ID to this folder etc/opt/symantec/scspagent/lib/instfunlib I try changing the folder permission but I keep getting this output : chmod: /opt/symantec/scspagent/lib/instfunlib: Permission Denied I did a listing on it... (3 Replies)
Discussion started by: mcdsweet98
3 Replies

6. Linux

Help with RT 4.0.4 Installation-Mason permission denied issue

Hi, I am trying to install RT 4.0.4 on Centos 6. I am almost done with the installation. However, when i try to start my web server (Apache - user: apache, group: apache) i get the following error: Starting httpd: : (in cleanup) Error while loading /opt/rt4/sbin/rt-server: Cannot create... (0 Replies)
Discussion started by: rtipx_user
0 Replies

7. Shell Programming and Scripting

Permission denied

I created a user so that when he logs in he will be directed to a menu /etc/passwd user1:x:115:1:Support -SysAd:/export/home/user1:/export/home/suppotrmenu/script.sh However when I logged in remotely from another server by ssh user1@1.1.1.1 , it saysexport/home/suppotrmenu/script.sh:... (4 Replies)
Discussion started by: lhareigh890
4 Replies

8. Shell Programming and Scripting

permission denied issue

hello I m trying to enter in a folder through my script but getting permission denied error .. Is there any command or somthing else so that i can access these folder through my script. (3 Replies)
Discussion started by: urfrnddpk
3 Replies

9. UNIX for Dummies Questions & Answers

Map Drive From Windows To Apache Shared Drive?

Anyone know how I can map a windows drive to an apache shared drive? In my httpd.conf file, I have: Alias /merc_rpts/ "/u/merc_rpts/" <Directory "/u/merc_rpts"> Options Indexes </Directory> I'm able to bring up a browser and see the contents of this folder. In... (0 Replies)
Discussion started by: gseyforth
0 Replies

10. UNIX for Dummies Questions & Answers

./ Permission Denied.

Could someone tell me why I am getting a permission denied message when I attempt to run this on an out file? Thanks! (8 Replies)
Discussion started by: trouscaillon
8 Replies
Login or Register to Ask a Question