Jump to content

Unable to share folder on disk using Samba -Rights problem?-


Recommended Posts

Posted

Hi All,

 

I've a folder on my user folder that is shared using samba (shared with everyone), and works ok.

 

I've a secondary 2TB disk formatted with ext4, and a folder on it that I want to share. My problem is that as soon as I share it with Samba (shared with everyone) it un-shares itself automatically. I suspect that it's a problem is caused by the rights on this secondary disk.

 

I've use chown to take ownership on the disk:

 

sudo chown -R elhtpc /media/elhtpc/STORE

 

And I've also try chmod:

 

sudo chmod -R 777 /media/elhtpc/STORE

 

Problem persists.

 

How can I share a folder content on this disk?

 

Many thanks in advance

Posted

I've format disk again with gparted (ext4), so I can't write on disk (as usual), so I made:

 

chmod -R 777 /media/elhtpc/ALMACEN

 

(The actual name is ALMACEN, not STORE). Now I had access from the local machine to write and create folders.

 

I try to share a folder (right click, properties, share tab, share with samba, allow guests, everyone: full control, elhtpc:full control), and on Rights tab I set "Ohers: Can view and modify content" and check "Apply to subfolders and its contents".

 

In this moment the folder get the "shared" icon but I can't access to it from Windows machine. Another important thing is that the values I set on share tab seems to dissapear when I press "accept".

 

I've try to force all of my samba clients to look like "elhtpc" for the shares. I edit /etc/samba/smb.conf and add "force user = elhtpc" under the workgroup line.

 

Now I can access to the new shared folder but I have only read rights, not write. If I enter on share tab in folder properties, I set "allow guests, everyone: full control", but when I accept and enter again is changed to "read only".

 

I've try:

sudo chown -R elhtpc /media/elhtpc/ALMACEN

But problem persist.

 

 

I copy the result of testparm -s

 

[global]
   server string = %h server (Samba, Ubuntu)
   server role = standalone server
   map to guest = Bad User
   obey pam restrictions = Yes
   pam password change = Yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   unix password sync = Yes
   syslog = 0
   log file = /var/log/samba/log.%m
   max log size = 1000
   dns proxy = No
   usershare allow guests = Yes
   panic action = /usr/share/samba/panic-action %d
   idmap config * : backend = tdb
   force user = elhtpc

[printers]
   comment = All Printers
   path = /var/spool/samba
   create mask = 0700
   printable = Yes
   print ok = Yes
   browseable = No

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers

 

This is the output of cat /proc/mounts:

 

rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=1833868k,nr_inodes=458467,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=369760k,mode=755 0 0
/dev/disk/by-uuid/928a3979-d26c-4d5a-96bc-7106314f545c / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
none /sys/fs/cgroup tmpfs rw,relatime,size=4k,mode=755 0 0
none /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0
none /run/user tmpfs rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755 0 0
none /sys/fs/pstore pstore rw,relatime 0 0
systemd /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,name=systemd 0 0
/dev/sdb1 /media/elhtpc/ALMACEN ext4 rw,nosuid,nodev,relatime,data=ordered 0 0

 

result of cat /etc/mtab | grep ALMACEN

 

/dev/sdb1 /media/elhtpc/ALMACEN ext4 rw,nosuid,nodev,uhelper=udisks2 0 0

 

¿How to get write access?

 

Many thanks in advance

Posted

I've just format the disk using ext3 instead of ext4 and now I can read/write in the disk from the Windows machine.

 

Am I missing important differentes if I "downgrade" from ext4 to ext3? The disk is going to be used mainly to manage downloads (transmission, jdownloader...) and storing files, films and tv series mainly.

 

Even with this, I would like to use ext4 if is possible in any way.

 

Many thanks in advance.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...