Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] set owner + mode on dirs below a start (was Re: Quick question: how to call a script function from "find"?)
On 2017-06-13 21:23, L A Walsh wrote:
Carlos E. R. wrote:
The intention was to convert:
find /home/cer/Fusion/Videos/ -type d -exec sudo chown cer:cer '{}' \;
find /home/cer/Fusion/Videos/ -type d -exec chmod
u+r+w+x,g+w+x,o+r-w-x,+t '{}' \;
find /home/cer/Fusion/Videos/ -type d -exec sudo chown cer-g:cer '{}' \;
#setfacl -m u:wwwrun:rx /data/waterhoard/Fusion.uno/Videos


---
How about:

find /home/cer/Fusion/Videos/ -type d -print0 | \
sudo xargs -0 install -d -g cer -o cer-g -m u=rwx,g=rx,o=x,+t

Because then I need an specific line in sudoers for xargs -0 install -d
-g .... etc.

My sudoers file is edited to allow only specific commands.

-- 1 line to replace the above 3 finds and bet it will execute
faster than any solution so far.

Note, I guessed you meant to have 'o' with execute
(pass-through) access that allows other to access deeper
directories with read access...(?)

No, I don't want others to have access. Only wwrun and group 'cer'. It
maybe "r--" for the directories so far. "---" for the files.

--
Cheers / Saludos,

Carlos E. R.
(from 42.2 x86_64 "Malachite" at Telcontar)

< Previous Next >
Follow Ups