LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-30-2014, 03:54 AM   #1
Tassadar
LQ Newbie
 
Registered: Jul 2013
Posts: 27

Rep: Reputation: Disabled
Unable to share folder on disk using Samba -Rights problem?-


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
 
Old 06-30-2014, 09:04 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,352
Blog Entries: 12

Rep: Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731
Is the partition containing the directory you want to share in your /etc/fstab file?

When it's mounted, how does it appear in /etc/mtab? (That may shed light on why you are having difficulties sharing it.)

Code:
cat /etc/mtab | grep [partition name]
 
Old 07-01-2014, 05:27 AM   #3
Tassadar
LQ Newbie
 
Registered: Jul 2013
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
Is the partition containing the directory you want to share in your /etc/fstab file?

When it's mounted, how does it appear in /etc/mtab? (That may shed light on why you are having difficulties sharing it.)

Code:
cat /etc/mtab | grep [partition name]


Many thanks for the help, frankbell,

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

Code:
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:
Code:
sudo chown -R elhtpc /media/elhtpc/ALMACEN
But problem persist.


I copy the result of testparm -s

Code:
[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:

Code:
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

Code:
/dev/sdb1 /media/elhtpc/ALMACEN ext4 rw,nosuid,nodev,uhelper=udisks2 0 0
┐How to get write access?

Many thanks in advance
 
Old 07-01-2014, 09:38 AM   #4
Tassadar
LQ Newbie
 
Registered: Jul 2013
Posts: 27

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] samba share with 2 folder giving problem centos 5.7 64bit khak.pa Linux - Newbie 11 01-14-2012 09:25 AM
[SOLVED] [b] Samba share folder problem togitoon Linux - Newbie 5 07-21-2011 04:08 PM
unable to share a folder in suse 10.0, folder defaults to not shared sirius57 Linux - General 1 05-15-2010 04:33 AM
How to configure rights on a Samba Share... rizean Linux - Networking 1 06-12-2009 11:46 PM
Keep file rights with samba share eRJe Linux - Server 1 08-14-2008 07:54 AM


All times are GMT -5. The time now is 10:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration