Reset ownership not working

ip-design

Verified User
Joined
Sep 9, 2012
Messages
5
When i try to use the reset ownership function in the file browser i get the following error:
Code:
cannot find file: /usr/local/bin/php

However when i do a `ls -la /usr/local/bin/php`
Code:
-rwxr-xr-x 1 root staff 27235400 Feb 10 12:43 /usr/local/bin/php

PHP is working normally in apache and cli.

php -v:
Code:
PHP 5.3.21 (cli) (built: Feb 10 2013 12:40:36) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies

DirectAdmin info:
Code:
Compiled for:	Debian 6.0 64-bit
Compile Date	Dec 4 2012, 00:17:24
Server Version	1.42.1

/var/log/directadmin/error.log
Code:
2013:02:28-09:21:44: Socket write error: fd is connected to a pipe or socket whose reading end is closed.  When this  happens the writing process will also receive a SIG_PIPE signal.  (Thus, the write return value is seen only if  the program catches, blocks or ignores this signal.)
2013:02:28-09:22:03: Socket write error: Unknown error
2013:02:28-09:22:03: Error while sending ./data/skins/marinars/images/nav_webmail1.gif
2013:02:28-09:22:10: Socket write error: Unknown error
2013:02:28-09:41:51: File ./data/users/brwwolpha/user.usage has been written to after this process read it.  Not going to overwrite it.
2013:02:28-09:45:48: Socket write error: Unknown error
2013:02:28-09:45:48: Error while sending ./data/skins/marinars/images/nav_help1.gif
2013:02:28-10:11:10: Timeout from from 62.238.204.251 : last flagged: Request::readAndProcess(*skt, 62.238.204.251, 62.238.204.251)
2013:02:28-10:16:13: Timeout from from 62.238.204.251 : last flagged: Request::readAndProcess(*skt, 62.238.204.251, 62.238.204.251)
2013:02:28-10:26:47: Socket write error: Unknown error

I use the custombuild script to update.

How can I fix this?
 

Sorry I forgot to mention. I allready ran that. the output
Code:
./directadmin b2000
Debug mode. Level 2000

DirectAdmin 1.42.1
Accepting Connections on port 2222
Sockets::handshake - begin
Sockets::handshake - end
Sockets::handshake - begin
Sockets::handshake - end
Sockets::handshake - begin
Sockets::handshake - end
Sockets::handshake - begin
Sockets::handshake - end
Sockets::handshake - begin
Sockets::handshake - end
/CMD_FILE_MANAGER/
 0: Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
 1: Accept-Encoding: gzip,deflate,sdch
 2: Accept-Language: nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4
 3: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
 4: Cache-Control: max-age=0
 5: Connection: keep-alive
 6: Content-Length: 99
 7: Content-Type: application/x-www-form-urlencoded
 8: Cookie: session=kb97sUlruUKVKjIkmY7iPGWZvn6HycjgBqn3KXsCzCfJux1eT6MsKsPFeTWa3EGE
 9: Host: serveraddress:2222
10: Origin: http://serveraddress:2222
11: Referer: http://serveraddress:2222/CMD_FILE_MANAGER
12: User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.99 Safari/537.22
Post string: select13=%2F.profile&chmod=755&resetowner=Reset+Owner&action=multiple&button=&overwrite=no&path=%2F
Checking referer http://serveraddress:2222/CMD_FILE_MANAGER to serveraddress:2222
Referer check passed: serveraddress=serveraddress 2222/CMD_FILE_M=2222
Command::doCommand(/CMD_FILE_MANAGER/)
Command::doCommand(/CMD_FILE_MANAGER/) : finished
Command::run: finished /CMD_FILE_MANAGER/

The rest of the requests is from style / images.

I do notice the error:
Code:
Error opening /var/log/directadmin/error.log: No such file or directory
with some requests. But the file exists, and during normal operation, the log works as shown in my first post.
 
/usr/local/bin/php should be root:root not root:staff

What permission have /var/log/directadmin/error.log?

Should be diradmin:diradmin

Regards
 
/usr/local/bin/php should be root:root not root:staff
I tested, it also doesn't work with root:root. But i guess thats because the 'others' have execution (and read) rights, so unless directadmin is trying to change the executable it should be able to use it.

What permission have /var/log/directadmin/error.log?

Should be diradmin:diradmin
It is diradmin:diradmin
 
I would suggest you to write to DA support to understand this issue since might be related to some kind of bug.

Before this, have you testet /usr/local/directadmin/scripts/set_permissions.sh all ?


Regards
 
I would suggest you to write to DA support to understand this issue since might be related to some kind of bug.

Before this, have you testet /usr/local/directadmin/scripts/set_permissions.sh all ?


Regards

I just tested the script, it didn't help. I will contact the DA support.
Thanks for thinking with me on this ;)
 
When i try to use the reset ownership function in the file browser i get the following error:
Code:
cannot find file: /usr/local/bin/php
Is that the only error you see in your browser?

It's odd because the reset doesn't use php at all.

1) I believe that error code is from the "Tokenizer::runScript" section of the tokenizer class.. probably called from within a skin somewhere (embedded script)
Certain parts of the filemanager are chrooted to /home/user, so /usr/local/bin/php wouldn't be acessible at that point.. (it would be looking at /home/user/usr/local/bin/php)
However, the file reset is not one of them... it doesn't chroot.

Are you using a DA skin? Any custom changes to it?

The Filemanager shouldn't have any embedded scripts, eg:
Code:
|$/usr/local/bin/php
because of the chroot issue.

2) The other thing could be the all_pre.sh script, check:
/usr/local/directadmin/scripts/custom/*

for any scripts which may be aborting the process before it starts.

3) Try the other methods of reseting the file/folder.
- the file itself has a link
- select the checkbox for the file, and click the "Reset Owner" button at the bottom of the table.

John
 
Are you using a DA skin? Any custom changes to it?
I'm using the MarinaRS skin, no custom changes (other than some style fixes).
But I also tried it using the enhanced skin. I don't see the php error, however i do the message 'An error occured while resetting the file ownership'. With no details.

2) The other thing could be the all_pre.sh script, check:
/usr/local/directadmin/scripts/custom/*

for any scripts which may be aborting the process before it starts.
I only have brute force monitor scrips in there and the default script for spamassassin.
Code:
-rwx------ 1 diradmin diradmin  873 Jul  7  2012 /usr/local/directadmin/scripts/custom/block_ip.sh
-rwx------ 1 diradmin diradmin   95 Feb 13  2012 /usr/local/directadmin/scripts/custom/brute_force_notice_ip.sh
-rwx------ 1 diradmin diradmin  360 Apr 19  2012 /usr/local/directadmin/scripts/custom/clean_iptables.sh
-rwx------ 1 diradmin diradmin 6295 Dec 10 12:38 /usr/local/directadmin/scripts/custom/README
-rwx------ 1 diradmin diradmin  424 Feb 17  2012 /usr/local/directadmin/scripts/custom/user_create_post.sh

3) Try the other methods of reseting the file/folder.
- the file itself has a link
- select the checkbox for the file, and click the "Reset Owner" button at the bottom of the table.
I use the second option. In my view, the file doesn't have a link for resetting. See screenshot (this is the 'enhanced' skin)

Schermafbeelding 2013-03-13 om 10.15.50.png
 
Back
Top