Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
July 11, 2012, 6:37 am
rate this thread
re's little security risk in what I'm trying to do. The server is Redhat En=
terprise, running WHM / cPanel.
I have two accounts; one is the current account (call it "original"), and t=
he other is set up for beta testing a new layout (call it "new"; on a separ=
ate domain). Both accounts have CGI scripts that allow the user to upload f=
iles, and I need the files to be accessible from either account.
To do this, I've set up a symlink on "new" with "original" as the target, l=
ln -s /home/original/public_html/cache /home/new/public_html/cache
chown -hR original.original /home/new/public_html/cache
I added "new" to the group "original":
usermod -a -G original new
I have all permissions set to 0777, and double checked that open_basedir is=
disabled on the server. Under PHP configuration, I changed "cgi.fix_pathin=
fo" to 1, and for testing, I disabled the firewall completely.
The logic is that if the user is on "original", they'll upload to /home/ori=
ginal/public_html/cache normally. But if they're on "new", they'll upload t=
o /home/new/public_html/cache, which is a symlink to /home/original/public_=
All of this has allowed me to READ from either account, but I still can't W=
RITE from "new" to "original". I've gone back and forth with my server prov=
ider who is absolutely convinced that it should be working at this point...=
but it's still not.
Can you guys suggest what I've overlooked? I've definitely overlooked somet=
hing... I just don't know what.
Re: Server question: read/write across multiple accounts
Redhat Enterprise, running WHM / cPanel.
;new"; on a separate domain). Both accounts have CGI scripts that allo=
w the user to upload files, and I need the files to be accessible from eith=
_pathinfo" to 1, and for testing, I disabled the firewall completely.
ot;new", they'll upload to /home/new/public_html/cache, which is a=
symlink to /home/original/public_html/cache.
and forth with my server provider who is absolutely convinced that it shou=
ld be working at this point... but it's still not.
My server provider sent me an alternative that works perfectly for my purpo=
ses. They installed bindfs for me, via:
yum install fuse-libs fuse
rpm -ivh http://dl.fedoraproject.org/pub/epel/5/i386/bindfs-1.8.3-3.el5.i38 =
Then, it's a simple matter of deleting the symlink, creating a hard link, a=
bindfs -u new /home/original/public_html/cache /home/new/public_html/cache
The description they gave me was that "this is more or less a mount --bind =
replacement that allows custom ownership". The "new" account will be the ow=
ner of all files in /home/new/public_html/cache, but each file is actually =
a file in /home/original/public_html/cache.
For the sake of future readers, if you see where I went wrong with the syml=
ink, then please still post it. But if others come across this stumbling bl=
ock and can't get past it, then bindfs is an easy, quick alternative worth =