Help - Samba share on second drive /dev/sdb1

General support questions

Help - Samba share on second drive /dev/sdb1

Postby SA2057 » 2013/02/01 10:53:22

Hello All,

I wonder if some one could shed some light . I can share and access files from home directories t mount the shared drive on another centos vm but cannot create folders or view files/folders(permission denied).

second hardrive mounted

mount -t ext4 /dev/sdb1 /temp


here are the details...
Edited /etc/fstab

output


#
# /etc/fstab
# Created by anaconda on Wed Jan 30 19:25:01 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_chembk-lv_root / ext4 defaults 1 1
UUID=b9910ea8-aeb8-4866-89dd-dc922714e54d /boot ext4 defaults 1 2
/dev/mapper/vg_chembk-lv_swap swap swap defaults 0 0
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/sdb1 /temp ext4 auto 0 0



smb.conf



#============================ Share Definitions ==============================

[homes]
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes

[new]

path = /temp/new
read only = No
writable = yes
browseable = Yes
valid users = Admin



Thanks
SA2057
 
Posts: 7
Joined: 2013/02/01 10:32:05

Help - Samba share on second drive /dev/sdb1

Postby jlehtone » 2013/02/01 11:35:30

Do you use the credentials of user Admin?

Additionally, selinux is an another player that may have to be told that it is ok to share something.
User avatar
jlehtone
 
Posts: 1431
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Help - Samba share on second drive /dev/sdb1

Postby SA2057 » 2013/02/01 11:54:10

Sorry. Could you pl. provide the code to enable selinux

Thanks
SA2057
 
Posts: 7
Joined: 2013/02/01 10:32:05

Re: Help - Samba share on second drive /dev/sdb1

Postby SA2057 » 2013/02/04 11:06:14

Hi,

Sorry I'm newbie .

These are the commands
getenforce

Setenforce 0

and rebooted the vm but still not working.

Thanks
SA2057
 
Posts: 7
Joined: 2013/02/01 10:32:05

Re: Help - Samba share on second drive /dev/sdb1

Postby TrevorH » 2013/02/04 11:13:51

The reboot will have reverted selinux to the setting in the /etc/sysconfig/selinux file. The setenforce command takes effect immediately and lasts until the next reboot - so your reboot undid the setenforce.
User avatar
TrevorH
Forum Moderator
 
Posts: 9146
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Help - Samba share on second drive /dev/sdb1

Postby SA2057 » 2013/02/04 11:40:37

Hi,

Thanks for you response. I tried again without rebooting the vm but no luck. Below is command to map mount the drive. Could you pl. let me know is it the correct command or not

mount -t cifs//xxx.xxx.xxx.xxx/new Desktop/fileshare -o username=my username, password=mypassword

error msg; mount error(13) : Permission denied
Refer to the mount. cifs (8) manual page (e.g. man mount.cifs)


Thanks
SA2057
 
Posts: 7
Joined: 2013/02/01 10:32:05

Re: Help - Samba share on second drive /dev/sdb1

Postby TrevorH » 2013/02/04 11:48:20

I'm assuming that the missing space after "-t cifs" is a typo in your post here since I think it would not have given a permission denied error. Did you look in /var/log/messages after the error to see if there is more information there?
User avatar
TrevorH
Forum Moderator
 
Posts: 9146
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Help - Samba share on second drive /dev/sdb1

Postby SA2057 » 2013/02/04 12:31:10

Hi,

Sorry it is wrong typo.

The log says denied connection from ( show different IP address on the same subnet as my VM is, but doesn't show my IP address of which I'm trying to mount the drive). Is it something to do with security?

Thanks
SA2057
 
Posts: 7
Joined: 2013/02/01 10:32:05

Re: Help - Samba share on second drive /dev/sdb1

Postby TrevorH » 2013/02/04 13:30:46

If this machine is not directly accessible from the internet then you could try `service iptables stop` as a debugging aid to see if that fixes it. If so then you'll need to add iptables rules to allow the correct ports. If it doesn't help then try pasting the errors here as the more specific you are about what's going wrong, the better the chances are that someone will be able to help.
User avatar
TrevorH
Forum Moderator
 
Posts: 9146
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Help - Samba share on second drive /dev/sdb1

Postby SA2057 » 2013/02/04 14:01:46

Thank you. I've decided to rebuilt the vm again so that it has the correct samba config file as I've made somany changes. I will post the output on this post. In mean time What would you suggest NFS as my main criteria is to share the drive between Centos systems.

Thanks
SA2057
 
Posts: 7
Joined: 2013/02/01 10:32:05

Next

Return to CentOS 6 - General Support

Who is online

Users browsing this forum: Google [Bot] and 7 guests