Suggestion to have multiple sites share a common shared directory - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: Suggestion to have multiple sites share a common shared directory (/thread-6657.html) |
Suggestion to have multiple sites share a common shared directory - gilbert - 05-07-2009 12:21 PM Hi, I have a client that would like to have several sites share a common set of files such as images. What permissions would you recommend I use to set a directory to have so it could be accessible by multiple ispcp users. Also would you suggest we use a link or do we need to copy the files to each of the sites directory structure? Please suggest pros and cons of using links versus copying files. Obviously copying would duplicate files and waste storage. If I created a folder such as /var/www/virtual/site1.com/htdoc/sharedfolder. Where would we actually put the sharefolder. I assume that the group would be www-data who would be the owner I guess if the permissions were rw-rw-r-- it would be ok? Thanks, Gilbert. RE: Suggestion to have multiple sites share a common shared directory - gilbert - 09-02-2009 11:05 AM Hi again, Does anyone have any suggestions for this? (05-07-2009 12:21 PM)gilbert Wrote: Hi, RE: Suggestion to have multiple sites share a common shared directory - Nuxwin - 09-02-2009 11:40 AM Hi Your client can not create a subdomain through the panel and put all the files (not executable) in the DocumentRoot? I do not understand the nature of your problem. RE: Suggestion to have multiple sites share a common shared directory - kilburn - 09-02-2009 03:40 PM Yeah, it seems totally unnecessary that all files are accessible by different virtual hosts. As nuxwin said, just create a subdomain, put all the files there, and then link to the resources using a full url like http://static.domain.tld/image.jpg RE: Suggestion to have multiple sites share a common shared directory - joximu - 09-02-2009 04:55 PM Maybe there are reasons for the multiple domains... ok, lets try... with php files there will be a permission problem when symlinking - so php files must be copied and the owner adopted to the domain. But with html, images etc symlinks should do the job. Owner: original domain, Group: www-data (rw-r-----) - or if you upload with ftp: group original domain, but make the folder and files world readable (minimum rw-r--r--)... That's my opinion... /Joximu RE: Suggestion to have multiple sites share a common shared directory - gilbert - 09-03-2009 09:50 AM Hi, The client has a dedicated server so security is not an issue of access between the sites is not an issue and or all sites on the server. user for site that initiates the copy is vu2001 when I su vu2001 issue cp /var/www/virtual/site1.com/htdocs/copyTest/pumadisc.jpg /var/www/virtual/site2.com/htdocs/copyTest/ I get cp: accessing `/var/www/virtual/site2.com/htdocs/copyTest/': Permission denied ls -l /var/www/virtual/ drwxrwx--- 8 vu2010 www-data 4096 2009-09-02 00:26 site2.com ls -l /var/www/virtual/site2.com/ drwxrwxr-x 5 vu2010 www-data 4096 2009-08-31 15:12 htdocs ls -l /var/www/virtual/site2.com/htdocs drwxrwxr-x 2 vu2010 www-data 4096 2009-08-31 15:12 copyTest Would I have to add vu2001 to www-data group is that a good solution? Thanks, Gilbert. RE: Suggestion to have multiple sites share a common shared directory - joximu - 09-03-2009 04:29 PM adding the vu-User to the group www-data would maybe also be a solution. Adding an x-Flag on the (home)folder site2.com (so we have perms 771) and of course allowing vu2001 to write in the destination folder (either change the group to vu2001 or add write permissions on the "copyTest" destination folder. /J RE: Suggestion to have multiple sites share a common shared directory - kilburn - 09-03-2009 05:11 PM Quote:The client has a dedicated server so security is not an issue of access between the sites is not an issue and or all sites on the server. Why don't you copy as root then? It will be much easier overall, just make sure to change file ownerships afterwards and done RE: Suggestion to have multiple sites share a common shared directory - joximu - 09-03-2009 05:16 PM ...maybe the customer uploads some new files and then they have to be spread over the other domains... - a bash script would do the job (with rsync or "cp -u" ...) and permission settings... /J |