0

I've taken the plunge and installed ubuntu to hoping to be able to set up a server for sharing music files and running torrents. .

I have also installed Samba, and although I can see the files from my windows 10 laptop I cannot access the shared files.

Testparm look like this

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Processing section "[Torrents]"
Processing section "[Down]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

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


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


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


[Down]
    comment = Torrent folder
    create mask = 0666
    directory mask = 0777
    force create mode = 0666
    force directory mode = 0777
    guest ok = Yes
    path = /media/peter/Torrents/down
    read only = No

The error on the windows says

"Windows cannot access". Have tried with both name and address, but get the same error message either way.

Any pointers?

Thanks

  • 1
    Are you trying to run or copy the files from the share? – Terrance Mar 11 at 15:27
  • The share will be for storage - so copying files to and from the share – Bertmus Mar 11 at 15:30
  • Does the user 'nobody ' (=default value for guest account) exist in you password file? – Marc Vanhoomissen Mar 11 at 16:01
  • The passwd file contains - nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin – Bertmus Mar 11 at 16:53
0

This is not a samba issue. It is a Linux permissions issue.

path = /media/peter/Torrents/down

Linux creates the /media/peter directory in such a way that it limits who can traverse it to peter and no one else. The guest user is not peter so it never gets to the /Torrents/down part of the path. One solution is to make the guest user appear to be you for that share by adding a force user = peter to the share definition:

[Down] comment = Torrent folder create mask = 0666 directory mask = 0777 force create mode = 0666 force directory mode = 0777 guest ok = Yes path = /media/peter/Torrents/down force user = peter read only = No

Then restart smbd: sudo service smbd restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.