Comments (8)
I was not aware of this option, I just tried, this perfectly fits the purpose, now I can make it a fully functional service for our use case.
Your software will be handy for Synology DSM 7 users. Thanks again !
from samba.
so you're talking about the main user group id?
or additional group memberships for each user?
from samba.
About the main gid right.
I can conduct some tests to see if it effectively leads to bugs about permissions.
But I'm afraid it could.
from samba.
I currently plan if we make it possible to set a list of groups and new groups+ids with the first group being the main group... I guess this should work for all possible use cases 🤔
from samba.
done and pushed, you can now create groups using environment variables and also specify a list of groups added to each account - this should solve your problem
from samba.
Thanks for your effort, here is my new compose file :
version: '2.1'
services:
samba-server:
image: servercontainers/samba
container_name: samba-server
hostname: samba-nt1
networks:
mac0:
ipv4_address: 192.168.100.145
environment:
## lawrence user ##
- ACCOUNT_lawrence=lawrence-smb
- UID_lawrence=1027
- GROUPS_lawrence=users
## media user ##
- ACCOUNT_media=media-smb
- UID_media=1035
- GROUPS_media=users
## Groups definition ##
- GROUP_users=100
## Directives and shares config ##
- SAMBA_GLOBAL_CONFIG_server_SPACE_min_SPACE_protocol=NT1
- SAMBA_GLOBAL_CONFIG_ntlm_SPACE_auth=ntlmv1-permitted
- SAMBA_CONF_MAP_TO_GUEST=Never
- SAMBA_VOLUME_CONFIG_music=[Musique]; path=/shares/music; guest ok = no; read only = no; browseable = yes; valid users = lawrence, media
volumes:
- /volume1/music/bibliotheque:/shares/music
- /volume1/docker/samba/conf-server:/etc/samba
restart: unless-stopped
networks:
mac0:
external: true
For exemple, I am checking whose group media is belonging to :
docker exec -it samba-server id media
uid=1035(media) gid=1035(media) groups=1035(media),100(users)
If I upload any file to the volume, it ends up belonging to media/media, I'd like it to be media/users instead.
I'm pretty sure what I get is the expected behaviour, if so I'll probaby get over it (asking people to chown regularly, but not a smart solution), but asking you just to be sure I'm not missing something obvious.
from samba.
ahhh now I get your problem - but I would resolve it this way:
add force group = media;
to your volume config
- SAMBA_VOLUME_CONFIG_music=[Musique]; path=/shares/music; guest ok = no; read only = no; browseable = yes; valid users = lawrence, media; force group = media;
this way, everytime someone uploaded something into this volume the group is set to media
- in the end all users with this group should be able to work with this file.
there are more options you can enforce:
force user = someuser;
force group = somegroup;
force create mode = 0666;
force directory mode = 2777
etc.
from samba.
yeah I'd guess it's clearer solution, you can specify the default groups for serveral volumes, and by putting your users into those groups you make sure the can access the files/folders.
with the primary group you always run into problems with users having a different main group (when they usually work on other volumes) create a file and now all your other users can't access them etc.
from samba.
Related Issues (20)
- Remove network_mode: host from docker-compose.yml HOT 1
- Image builds broken HOT 3
- /etc/avahi/services/samba.service HOT 1
- users group always with the id 100 whatever HOT 2
- adduser not possible if gid = uid HOT 1
- Error loading shared library HOT 3
- No access to shared folder HOT 5
- Read-only shared folders HOT 2
- Question: Which version of Samba (v1/v2/v3/v4) is being used, and can it be changed for best performance? HOT 5
- force user = %U with timemachine HOT 5
- Why does turning on time machine modify my read and write permissions HOT 4
- Samba Server not visible HOT 5
- `disable netbios = yes` disregards `$NETBIOS_DISABLE` HOT 1
- Multiline not working HOT 3
- Cannot use UID and GID of a host user HOT 1
- differnce to dperson/samba HOT 1
- How to set the Time Machine share max size differently for different users HOT 6
- Why I can't create file? HOT 2
- Add configuration to change AVAHI service host name HOT 10
- Not Able to Delete Files HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samba.