What have the permissions been set to +w for groups and all? - Raspberry Pi Forums
why did raspberry pi add write permissions groups , all, when asked not to? pretty stock install of pi b:
code: select all
pi@raspberrypi ~ $ touch test pi@raspberrypi ~ $ chmod 777 test pi@raspberrypi ~ $ ls -l | grep test -rwxrwxrwx 1 pi pi 0 apr 18 11:53 test pi@raspberrypi ~ $ chmod -rw test chmod: test: new permissions --x-wx-wx, not --x--x--x pi@raspberrypi ~ $ ls -l | grep test ---x-wx-wx 1 pi pi 0 apr 18 11:53 test code: select all
pi@raspberrypi ~ $ uname -a linux raspberrypi 3.6.11+ #371 preempt thu feb 7 16:31:35 gmt 2013 armv6l gnu/linux
check man page "chmod"... intentional
"when none of these [ugoa, user, group, owner, all] given, effect if given, bits set in umask not affected"
umask protected permissions of new file, , property of directory in file created. current permissions shown typing "umask" no parameters. pi user directory, umask 0022. numbers in umask correspond letters in ls -l output on binary basis, 777 gives rwx each of 3 sets of letters (3 sevens) 7 1 + 2 + 4 (binary 111) , each binary 1 sets letter r, w or x
command "chmod -rw test" not have "a", , tries remove r , w each of 3 letter groups. umask 022 keeps (or puts back) 2 w's. try last bit "chmod a-rw" , permissions wanted
(sorry, explain clearly, maybe not?)
"when none of these [ugoa, user, group, owner, all] given, effect if given, bits set in umask not affected"
umask protected permissions of new file, , property of directory in file created. current permissions shown typing "umask" no parameters. pi user directory, umask 0022. numbers in umask correspond letters in ls -l output on binary basis, 777 gives rwx each of 3 sets of letters (3 sevens) 7 1 + 2 + 4 (binary 111) , each binary 1 sets letter r, w or x
command "chmod -rw test" not have "a", , tries remove r , w each of 3 letter groups. umask 022 keeps (or puts back) 2 w's. try last bit "chmod a-rw" , permissions wanted
(sorry, explain clearly, maybe not?)
raspberrypi
Comments
Post a Comment