Git Product home page Git Product logo

Comments (6)

MarvAmBass avatar MarvAmBass commented on August 17, 2024

Hi there,

thanks for using my container.
I just looked over your infos and it seems like it should work

I also just tried to start the container (current latest) with my provided docker-compose file - it also works.

for me it's just an issue with the permissions on your share. try to read about samba and permissions and make sure the user you add is able to write on those directory.

after that it should work

from samba.

codefriar avatar codefriar commented on August 17, 2024

Thanks for the quick reply. I'm still slightly confused.

the username created is the same as the host system. In this case kpoorman. Additionally,
the user id's match (host: 1000, container:1000) and the folder shared is mounted as my user.

I've modified my compose file to more closely match yours -

networks:
  samba:
    driver: bridge

services:
  samba:
    restart: unless-stopped
    image: servercontainers/samba:latest
    networks:
      - samba
    volumes:
      # This is the parent folder of all HLOS storage
      - "/mnt/homelabos/media:/shares/kpoorman"
    ports:
      - 139:139
      - 445:445
    environment:
      - SAMBA_CONF_WORKGROUP=WORKGROUP
      - SAMBA_CONF_SERVER_STRING=File Server
      - SAMBA_CONF_MAP_TO_GUEST=Bad User
      - ACCOUNT_kpoorman=notToday
      - SAMBA_VOLUME_CONFIG_HomelabOS="[HomelabOS]; path=/shares/kpoorman; guest ok = yes; valid users = kpoorman read only = no; browseable = true;"

However, I still get

samba_1  | check_ntlm_password:  authentication for user [kpoorman] -> [kpoorman] -> [kpoorman] succeeded
samba_1  | process_usershare_file: stat of /var/lib/samba/usershares/homelabos failed. No such file or directory
samba_1  | process_usershare_file: stat of /var/lib/samba/usershares/homelabos failed. No such file or directory
samba_1  | process_usershare_file: stat of /var/lib/samba/usershares/homelabos failed. Permission denied
samba_1  | process_usershare_file: stat of /var/lib/samba/usershares/homelabos failed. Permission denied
samba_1  | check_usershare_stat: file /var/lib/samba/usershares/ owned by uid 0 is not a regular file

But /var/lib/samba/usershares isn't mentioned anywhere in my config. (or yours) please advise

from samba.

MarvAmBass avatar MarvAmBass commented on August 17, 2024

to be honest, it seems like you try to mount something wrong

whats the mount command you use?

you should be able to mount is using

mount.cifs //HOSTNAME/HomelabOS /mnt -o user=kpoorman

from samba.

codefriar avatar codefriar commented on August 17, 2024

Mount command:

sudo mount.cifs //192.168.1.173/HomelabOS/ /mnt -o user=kpoorman

Here's the volume config:

SAMBA_VOLUME_CONFIG_kpoorman: "[HomelabOS]; path=/shares/homelabos; valid users = kpoorman; guest ok = no; read only = no; writable = yes; browsable yes;"

Unfortunately it's not writable and subdirectories are not traversable. when I cd to a directory, and run ls, I get

ls: reading directory '.': Permission denied

I'm really confused as the docs I've read indicate that setting writable = true should work?

also, here's the rendered smb.conf

[global]
   server role = standalone server

   workgroup = WORKGROUP
   server string = file server

   map to guest = Bad User

   dns proxy = no

   log file = /dev/stdout

   vfs objects = catia fruit streams_xattr
   fruit:aapl = yes
   fruit:nfs_aces = no
[HomelabOS]
 path=/shares/homelabos
 valid users = kpoorman
 guest ok = no
 read only = no
 writable = yes
 browsable yes

[TimeCapsule Bob]
 path=/shares/timemachine
 valid users = bob
 guest ok = no
 read only = no
 browseable = no
 fruit:aapl = yes
 fruit:time machine = yes
 fruit:time machine max size = 500G

[Alice Share]
 path=/shares/alice
 valid users = alice
 guest ok = no
 read only = no
 writable = yes
 browseable = yes

from samba.

codefriar avatar codefriar commented on August 17, 2024

additional information gleaned from docker logs:

samba_1  | get_ea_dos_attribute: Rejecting root override, invalid stat [Documents]
samba_1  | get_ea_dos_attribute: Rejecting root override, invalid stat [Books]
samba_1  | get_ea_dos_attribute: Rejecting root override, invalid stat [temp]
samba_1  | get_ea_dos_attribute: Rejecting root override, invalid stat [Video]
samba_1  | get_ea_dos_attribute: Rejecting root override, invalid stat [Backups]
samba_1  | get_ea_dos_attribute: Rejecting root override, invalid stat [Music]
samba_1  | get_ea_dos_attribute: Rejecting root override, invalid stat [Pictures]
samba_1  | get_ea_dos_attribute: Rejecting root override, invalid stat [Downloads]

and

samba_1  | get_ea_dos_attribute: Rejecting root override, invalid stat [Documents]
samba_1  | error reading meta xattr: Permission denied

from samba.

MarvAmBass avatar MarvAmBass commented on August 17, 2024

everything seems to be correct

some hints:

  • use a different test directory

  • try changing permissions of that directory to chmod 777 -R .

  • something I use to do - mount every directory inside the container

    • "/mnt/homelabos/media/DIR1:/shares/kpoorman/DIR1"
    • "[DIR1]; path=/shares/kpoorman/DIR1"

other than that I can't really help you - I tested it on my side and it works fine

from samba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.