[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: permissions quandary



>
> I've got a development server running my live site on my lan and
> am getting
> it set up to use suexec on apache. One problem I'm running into is with
> setting permissions properly.
>
> Have chrooted everything for the site over the correct
> user:group, however
> for directories it seems they need to be 0755 in order for files
> in them to
> be readable.
>
> chmod -R ga+X .
>
> set everything to 0755, so I tried something to change non-dirs
> back to 0744
>
> [root penguin howami]# chmod -R ga-X ./*.cgi
> chmod: failed to get attributes of `./*.cgi': No such file or directory
> [root penguin howami]#
>
>
> So how can I do this? Hope it makes sense.
>

I'm not sure exactly what you're trying to do.  Do you want dirs to be 0755
and regular files to be 0644 ?
You could do soething like


find . -type d -print |xargs chmod 0755
find . -type f -print |xargs chmod 0644

I would actually do this first

find . -type d -print |xargs ls -ld | more
and
find . -type f -print |xargs ls -ld | more

so you can view the output of find and verify that the files you are going
to be changing permission for are actually the ones you wnat to change
permission for .. and then do the find piped to chmod


Ben

>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]