Can not restrict the Document Root directory for Apache - help required

bigred_247

New Member
Joined
Apr 18, 2020
Messages
1
Reaction score
0
Credits
0
I'm pretty new to Linux and am trying to lock down Apache 2.4 but can not get the following command to work. FYI, I am using Amazon Linux 2 on AWS:

example found online:
find -L $DOCROOT -group $GRP -perm /g=w -print | xargs chmod g-w

my command:
find -L /var/www/html -group apache -perm /g=w -print | xargs chmod g-w

but I receive the error: "chmod: missing operand after ‘g-w’"

Can anybody shed some light or assist?

Thanks.
 


man chmod

You have to specify the file being changed.
 
Make the results of your find a variable, then chmod g-w $MYVARIABLE
 

Staff online


Latest posts

Top