Re: Command to set folder\\file permitions

Hi

  1. If the user wwwrun has read-rights on this folder, then the
    apache2-webserver serves this pages correctly outside. If you need to
    provide CGI-scripts, then you must add the executable-right to the
    wwwrun-user (or group www).
  2. One way is
    Code:

chown -R wwwrun:www /srv/www/htdocs/*

to set the correct ownership and
Code:

chmod -R 750 /srv/www/htdocs/*

to set the proper rights.
3) It depends, with which user these files are being created. One way
could be to set the umask-flag for this user or the setgid-right on the
directory.

Regards,
Tom


amo_vzug

amo_vzug’s Profile: http://forums.novell.com/member.php?userid=25342
View this thread: http://forums.novell.com/showthread.php?t=443903

Thank you!

What will be the influence of the “h” switch in the “chown -hR
wwwrun:www /srv/www/htdocs/*” command?

What is the command to set the setgid-right on the directory.

TIA

Nanu


nanu

nanu’s Profile: http://forums.novell.com/member.php?userid=39251
View this thread: http://forums.novell.com/showthread.php?t=443903

The “h”-switch changes only the the owner of the symlink itself (it
touches not the ownership of the target-file).

For the setgid-attribut, you need first to change the correct group.
For instance:
Code:

chgrp www /srv/www/htdocs/

Thanks,

amo_vzug;2133193 Wrote:[color=blue]

The “h”-switch changes only the the owner of the symlink itself (it
touches not the ownership of the target-file).

For the setgid-attribut, you need first to change the correct group.
For instance: >[/color]
Code:
--------------------[color=blue][color=green]

chgrp www /srv/www/htdocs/[/color][/color]
--------------------[color=blue][color=green]
.[/color]
Then you need to modify the rights like this:[color=green]
[/color][/color]
Code:
--------------------[color=blue][color=green]
chmod 2770 /srv/www/htdocs/[/color][/color]
--------------------[color=blue][color=green]
[/color]
/QUOTE]

Is the “2770” in the above code correct?

TIA

Nanu[/color]


nanu

nanu’s Profile: http://forums.novell.com/member.php?userid=39251
View this thread: http://forums.novell.com/showthread.php?t=443903

It depends on, what you’re trying. All newly created directories below
htdocs inherits the group, which you set on the htdocs-directory.

The commands

Code:

chgrp www /srv/www/htdocs/
chmod 2770 /srv/www/htdocs/


are setting the htdocs-directory to

Code:

drwxrws— 2 root www 4.0K Sep 1 13:05 htdocs/


Regards
Tom


amo_vzug

amo_vzug’s Profile: http://forums.novell.com/member.php?userid=25342
View this thread: http://forums.novell.com/showthread.php?t=443903