View Single Post
  #1  
Old 3rd September 2009, 05:06
mzerbe mzerbe is offline
Junior Member
 
Join Date: Dec 2008
Location: Bangkok, Thailand
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Exclamation Possibly a permissions bug? (groupadd, useradd, usermod)

Hi Guys,

first at all, thank you for this great piece of Software.

I possibly found a bug, but I'd like to post it here, to see if somebody else could reproduce that.(Hence reproduced, I guess the better place is the bugtracker.)


Environment:


ISPConfig 3.0.1.4 from SVN - Perfect Server Setup Debian Lenny (AMD64)

Conventions used below:


hostname: mymachine.example.com

Sitenames:
example1.com
example2.com
example3.com
example4.com

myuser = the first created client (client1)

What have I done?
I created example1.com, example2.com, example3.com, example4.com without having a user.

Later I created a client myuser (=client 1) and assigned example1.com, example2.com, example3.com, example4.com to that user in "Sites" menu. (No DNS Entry created yet)


Afterwards, I found following entries in ISPConfig cron.log
- groupadd error appeared two times,
- useradd error sometimes
- usermod error quite often.

Code:
chroot: cannot run command `groupadd': No such file or directory
chroot: cannot run command `useradd': No such file or directory
chroot: cannot run command `usermod': No such file or directory
There is a related entry in ispconfig.log
Code:
mymachine:/var/www/clients# cat /var/log/ispconfig/ispconfig.log 
31.08.2009-20:32 - ERROR - WARNING: could not open file /var/www/etc/group
Looking at the permissions:
Code:
mymachine:/# ls -al /var/www/etc/
insgesamt 8
drwxr-xr-x 2 root root 4096 31. Aug 20:32 .
drwxr-xr-x 6 root root 4096  3. Sep 04:13 ..
-rw-r--r-- 1 root root    0  3. Sep 04:28 group
Srange: web1:client 1 has folder permissions for client0 ?
Code:
mymachine:/var/www/clients# ls -al/var/www/clients/client1/web1
insgesamt 24
drwxr-x--x 6 web1 client1 4096 31. Aug 20:32 .
drwxr-xr-x 6 root root    4096 31. Aug 22:57 ..
drwxr-x--x 2 web1 client0 4096 31. Aug 20:32 cgi-bin
lrwxrwxrwx 1 web1 client0   41 31. Aug 20:32 log -> /var/log/ispconfig/httpd/example1.com
drwxr-x--x 2 web1 client0 4096 31. Aug 20:32 ssl
drwxrwxrwx 2 web1 client0 4096 31. Aug 20:32 tmp
drwx--x--- 5 web1 client0 4096 31. Aug 22:14 web
--> Seams to be wrong.

The other entries:
Code:
mymachine:/var/www/clients# ls -al/var/www/clients/client1/web2
insgesamt 24
drwxr-x--x 6 web2 client1 4096 31. Aug 21:40 .
drwxr-xr-x 6 root root    4096 31. Aug 22:57 ..
drwxr-x--x 2 web2 client1 4096 31. Aug 21:40 cgi-bin
lrwxrwxrwx 1 web2 client1   42 31. Aug 21:40 log -> /var/log/ispconfig/httpd/example2.com
drwxr-x--x 2 web2 client1 4096 31. Aug 21:40 ssl
drwxrwxrwx 2 web2 client1 4096 31. Aug 21:40 tmp
drwx--x--- 4 web2 client1 4096 31. Aug 21:40 web

mymachine:/var/www/clients# ls -al /var/www/clients/client1/web3
insgesamt 24
drwxr-x--x 6 web3 client1 4096 31. Aug 21:41 .
drwxr-xr-x 6 root root    4096 31. Aug 22:57 ..
drwxr-x--x 2 web3 client1 4096 31. Aug 21:41 cgi-bin
lrwxrwxrwx 1 web3 client1   42 31. Aug 21:41 log -> /var/log/ispconfig/httpd/example3.com
drwxr-x--x 2 web3 client1 4096 31. Aug 21:41 ssl
drwxrwxrwx 2 web3 client1 4096 31. Aug 21:41 tmp
drwx--x--- 4 web3 client1 4096 31. Aug 21:41 web

mymachine:/var/www/clients/client1/web2# ls -al /var/www/clients/client1/web4
insgesamt 24
drwxr-x--x 6 web4 client1 4096 31. Aug 21:49 .
drwxr-xr-x 6 root root    4096 31. Aug 22:57 ..
drwxr-x--x 2 web4 client1 4096 31. Aug 21:49 cgi-bin
lrwxrwxrwx 1 web4 client1   44 31. Aug 21:49 log -> /var/log/ispconfig/httpd/example4.com
drwxr-x--x 2 web4 client1 4096 31. Aug 21:49 ssl
drwxrwxrwx 2 web4 client1 4096 31. Aug 21:49 tmp
drwx--x--- 4 web4 client1 4096 31. Aug 21:49 web
looking OK.

- Are the errors thrown during the initial setup of an customer/group only? Then this might be a minor bug.


Solution for that web1:client0 instead of web1:client1 problem was:


Go to site menu.
1. Choose the domain example1.com
2. Assign that domain to the "empty user" (blank space in drop down menu (=client0)) and save.
3. Choose the domain example1.com again.
4. Assign that domain to "myuser" (client1) again and save.

Note: I don't know yet, if the errors regarding groupadd, useradd, usermod are resolved too!

Code:
mymachine:/var/www/clients# ls -al /var/www/clients/client1/web1
insgesamt 24
drwxr-x--x 6 web1 client1 4096 31. Aug 20:32 .
drwxr-xr-x 6 root root    4096  3. Sep 04:13 ..
drwxr-x--x 2 web1 client1 4096 31. Aug 20:32 cgi-bin
lrwxrwxrwx 1 web1 client1   41 31. Aug 20:32 log -> /var/log/ispconfig/httpd/example1.com
drwxr-x--x 2 web1 client1 4096 31. Aug 20:32 ssl
drwxrwxrwx 2 web1 client1 4096 31. Aug 20:32 tmp
drwx--x--- 5 web1 client1 4096 31. Aug 22:14 web
Regards from Bangkok.

Mario

PS: Please let me know in the threat if the German or English Forum is the better place for that kind of threats.
Reply With Quote
Sponsored Links