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

Scripts not executed #44

Closed
FallenRiteMonk opened this issue Aug 5, 2016 · 4 comments
Closed

Scripts not executed #44

FallenRiteMonk opened this issue Aug 5, 2016 · 4 comments

Comments

@FallenRiteMonk
Copy link

Hy,

I have the same permission problem as in #37 and #16. I know exactly what the problem is and how to fix it, but I would like to fix it in a automatic way (without changing folder permissions in the container manually). The two workaround stated in these issues would work, but for some reason my scripts don't get executed on startup of the container. If I enter the container and launch them manually, they work perfectly fine.
Does this not work with the current version?

@atmoz
Copy link
Owner

atmoz commented Aug 12, 2016

Scripts should work. Can you post your docker-compose.yml or command line? Have you checked the log?

@FallenRiteMonk
Copy link
Author

compose file:

sftp:
  #   image: atmoz/sftp:alpine-3.4
  #   ports:
  #     - "2222:22"
  #   volumes:
  #     - /home/user/test
  #     - ./sftp/permission_fix.sh:/etc/sftp.d/permission_fix.sh
  #   command: user:passwd:1000
  #   container_name: sftp

as already said entering the running docker and executing the script manually (bash permission_fix.sh) fixes the permission with no problem. I also tried using a script that only echos something, but launching the container and looking at the logs didn't show the echo output, that's why I said that it isn't executed.

@atmoz
Copy link
Owner

atmoz commented Aug 12, 2016

Does the file sftp/permission_fix.sh have execute permission?

@FallenRiteMonk
Copy link
Author

That was it, thanks!!!!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants