Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
[opensuse] Re: set owner + mode on dirs below a start (was Re: Quick question: how to call a script function from "find"?)
Carlos E. R. wrote:
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.
---
Right -- so now you only need 1 line, versus the above
method requiring at least 2 lines.

Or, you could store a script in /usr/bin, that does your
xargs call. Then you can just permit the script.

-about running a shell script with the command in it?
-- 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.
Why 'r'? Why not '---'?

What does a lone 'r' on a directory allow you to do? I.e. if you
don't want others to have access, then why are you not using
'---'?







--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups