开发者

PHP moving files to root when uploaded by another web user

We use a Java upload applet to let clients FTP files to our website.

For security, it uses a "web_user" (as created in PLESK) so this user gets their own area outside the main root e.g

/var/www/vhosts/mydomain.com/web_users/clientuploaduser/

I'm trying to copy the files they upload backt开发者_如何学JAVAo the web root via php so we can use them e.g to

/var/www/vhosts/mydomain.com/httpdocs/clientdropbox/

I can't seem to do so.

I can use main FTP account to go in and move the files that way as it has more permissions than the client one, but it's not particularly efficient and it's a little slow.

Is there a way I can use PHP to move those files? We have root access to the machine, so if there's permissions that can be changed, or something, then it's no issue.

Thanks.


The user that moves the file must have read permissions on /var/www/vhosts/mydomain.com, web_users, and httpdocs and read/write permissions on httpdocs/clientdropbox/. A lot of times the read permissions on the lower directories are overlooked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜