Skip to content

Instantly share code, notes, and snippets.

@icecrime
Created December 3, 2014 02:55
Show Gist options
  • Save icecrime/958bc7ef7dc02e36a0a3 to your computer and use it in GitHub Desktop.
Save icecrime/958bc7ef7dc02e36a0a3 to your computer and use it in GitHub Desktop.
Directory special bit issue
FROM busybox
RUN mkdir test_dir
RUN chmod 4755 test_dir
RUN [ $(ls -ld /test_dir | awk '{print $1}') = 'drwsr-xr-x' ]
ADD ./data/ /
RUN [ $(ls -ld /test_dir | awk '{print $1}') = 'drwsr-xr-x' ]
@icecrime
Copy link
Author

icecrime commented Dec 3, 2014

root@d31d69419f72:/tmp/test2# ls -Rl data/
data/:
total 0
drwxr-xr-x 2 root root  60 Dec  3 02:40 test_dir

data/test_dir:
total 4
-rw-r--r-- 1 root root  6 Dec  3 02:40 test_file

@jessfraz
Copy link

jessfraz commented Dec 4, 2014

well you would have to chmod -R no? for recursive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment