termux / termux-tools

Scripts and small programs that are packaged into termux's termux-tools package
GNU General Public License v3.0
303 stars 69 forks source link

Update termux-restore.in #101

Closed elig0n closed 4 months ago

elig0n commented 4 months ago

Use one 'find' run to fix files permissions

using chmod's X bit

sylirre commented 4 months ago

This not acceptable.

The whole idea of find/xargs commands to ensure that all directories and files have RW access. Directories are special and in addition to RW should have exec bit set.

Files have RW as least permission. Executable bit must be ignored if was not set previously.

sylirre commented 4 months ago

Reopening, did't saw it actually u+rwX and not u+rwx. The former seems to behave as it should.

~ $ touch file
~ $ mkdir dir
~ $ chmod 000 file dir
~ $ chmod u+rwX file dir
~ $ ls -ld file dir
drwx------ 2 user group 4096 июн 13 16:56 dir
-rw------- 1 user group    0 июн 13 16:56 file