Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File permissions #49

Closed
foleymic opened this issue Mar 22, 2017 · 3 comments
Closed

File permissions #49

foleymic opened this issue Mar 22, 2017 · 3 comments
Assignees

Comments

@foleymic
Copy link

foleymic commented Mar 22, 2017

First off, thank you David for creating this. Like others have mentioned, this is a great tool. Now to my issue (which, admittedly, is most likely user error or user misunderstanding). I am trying to mount an existing folder from the host machine and expose it as a samba mount. Everything works great, but I've noticed that whenever I edit a file that has executable permission from the samba client (mac os in my case), it becomes just read/write. Am I doing something wrong?

Here's my docker run command:
docker run -it --rm --name samba -p 139:139 -p 445:445 -v /data:/data --env USERID=1002 --env GROUPID=1002 --env TZ=America/New_York dperson/samba -u "user1:user1" -s "data;/data;yes;no;no;user1;user1"

User Id and Group Id 1002 are the ids for the user owning the files in /data on my host.

Thanks again!

@dperson dperson self-assigned this Mar 22, 2017
@dperson
Copy link
Owner

dperson commented Mar 22, 2017

Windows doesn't really have the concept of an execute bit, and in my experience left janky permissions on files. ServerFault has a summary of the issue.

I can change things so that you can set a default file perms and directory perms if that would solve the problem for you. But managing execute bits, and the concept of other in the Unix on a per file basis over CIFS isn't really possible as I understand it. It's a limitation of the protocol that was never designed to support anything but windows.

@foleymic
Copy link
Author

Thanks David, that helps explain it. And thank you for offering to add configurability set the default file permissions, but I don't think that will work in my case - these files are tracked by git, so any changes to permissions will be seen by git as a change. Since most of the files we will be changing are java, I think we can live without the x permission most of the time (or stick with git push and pull to move changes to the development VM).

I am ok with closing this ticket, unless you'd like to add the configuration feature for default perms.

Thanks again

@dperson
Copy link
Owner

dperson commented Mar 22, 2017

If it won't fix your problem, then I won't add extra complexity to the script. You're welcome. =)

@dperson dperson closed this as completed Mar 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants