BUG: `HOME` does not contain the right path on FreeBSD

interfasys

Verified User
Joined
Oct 31, 2003
Messages
1,821
Location
Switzerland
`HOME` is defined as /home/username and in most cases, it works, but there is a problem when this is used in HTTP templates on FreeBSD like in this example:
Code:
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp:/usr/local/lib/php/|
which will generate this
Code:
php_admin_value open_basedir=/home/username/:/tmp:/var/tmp:/usr/local/lib/php/|
because scripts requiring access to the user's home directory will ask if it's allowed to access /usr/home/username and they will fail.

Yes, we can fix it ourselves by editing the templates, but I think it would be a good idea to write the correct path for HOME.
 
Hello,

DA grabs the home path from /etc/passwd.

Check to see if the home path is set to /home/user, or /usr/home/user in the system password file. If it's /home/user, then the default options with "pw" for user creation would need to be changed to have it use /usr/home/user.. the true path of the account.

John
 
Hello John,
Thank you for the explanation. It's set to /home/user, so I'll just modify the templates to include both paths, but maybe openbasedir doesn't even care about the difference...
I just noticed the discrepancy in the logs and thought I would mention it.
Olivier
 
Back
Top