Current time: 11-26-2024, 01:45 AM Hello There, Guest! (LoginRegister)


Post Reply 
Fix permisisions of /var/www/virtual/domain
Author Message
Lucan Offline
Member
*
Beta Team

Posts: 982
Joined: Jul 2008
Reputation: 12
Post: #3
RE: Fix permisisions of /var/www/virtual/domain
This Script was once posted:

Code:
#!/bin/bash

# Man sollte im htdocs Verzeichnis sein
# und dieses sollte dem richtigen vuXXX-User gehören
username=$(ls -ld . | cut -d" " -f3)
echo "Setze auf Benutzer: $username"
echo "Abbrechen -> Ctrl-C, sonst weiter mit Enter..."

read

# Owner setzen vu:vu
cmd="find ./ -type d -exec chown $username:$username {} ;"
#echo $cmd
($cmd)

cmd="find ./ -type f -exec chown $username:$username {} ;"
#echo $cmd
($cmd)

# Permissions setzen
cmd="find ./ -type d -exec chmod 0755 {} ;"
#echo $cmd
($cmd)

cmd="find ./ -type f -exec chmod 0644 {} ;"
#echo $cmd
($cmd)

# aber PHP Dateien etwas weniger...
cmd="find ./ -type f -regex .*\.php$ -exec chmod 0640 {} ;"
#echo $cmd
($cmd)

echo "fertig..."
echo ""

It sets the file permission and the chmod of the files.

But it have to be performed for every customer at the htdocs folder I think.

Maybe that helps you
04-26-2009 02:55 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Fix permisisions of /var/www/virtual/domain - Lucan - 04-26-2009 02:55 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)