Comments (12)
I've changed the Samba user to root, and it seems to be working.
from samba.
Hi there, I'd say the problem is by creating a user and giving him the already taken userid of root
- use a userid from the user range.
So there seems to be a permission problem. just try the following: create a new folder for this test, configure a user with a userid from the user range using the ACCOUNT_test
and UID_test
.
you can set permissions to this folder from inside podman (don't know if it also has a exec -ti
like feature) if the folder is owned by your testuser it should work. or you edit the permissions from outside your container.
from samba.
I tried chown 1000 /shares/public
, and after doing so, it seems to be able to upload normally. But in fact, the original owner of the /shares/public
file is root, which may be the reason why it cannot be written. I am not particularly clear about the permission management of docker.
I set the Samba user to root, and the log appears to show that the UID of the Samba user has changed to 0, but that looks dangerous.
Considering that containers running in Podman rootless mode actually work primarily on root in the container, and that changing the folder owner can cause file owners outside the container to become abnormal, it might be necessary to use root as the Samba user, but are there any other security measures?
from samba.
thats a good point, I remember that some container runtimes might use randomized uuids for running inside the container, maybe that's the case with podman.
ahhh so you use the rootless mode? isn't this the mode with the randomized uids?
from the docker world if you mount a volume from outside the permissions will not automatically change with the mount - so if you want to write from within the docker container to the volume you need to make sure to have the appropriate access rights
from samba.
Podman rootless mode basically maps the root user in the container to the running user running Podman, but using other users in the container will be mapped to a UID greater than 10000.
I do not know the specific user UID mapping rule.
from samba.
can you check if it works without this rootless mode?
from samba.
I'll close this issue then
from samba.
Excuse me, is it possible to perform user mapping in samba?
from samba.
yes it is - and usually the way to go :) you can have a very complicated setup to map different samba users to another linux user, or enforce the group which is used to create objects in a certain share etc.
to check what you need take a look at samba docs.
also this issue might help you a lot ;) #45
from samba.
Can you provide user-mapped variables in the script? This seems to be a lot more convenient.
from samba.
it's already possible to use env variables to configure all that, take a look at the readme etc.
from samba.
It seems that the username map key value can only be a file path, which means I need to mount /etc/samba/usermap.txt additionally?
from samba.
Related Issues (20)
- Unknown socket option TCP_NODELAY IPTOS_LOWDELAY HOT 1
- samba:smbd-only-latest remains unhealty, everything works though HOT 4
- 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
- Image with tag smbd-only-latest reported as unhealthy HOT 1
- write access to folders owned by www-data HOT 1
- Latest build (and smbd-only-latest) cannot access shares, numerous errors HOT 22
- pid_to_procid: messaging_dgm_get_unique failed: No such file or directory HOT 1
- tdb(/var/lib/samba/registry.tdb): tdb_open_ex: could not open file /var/lib/samba/registry.tdb: No such file or directory HOT 1
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.