Shared directory between sites

Discussion in 'General' started by Toucan, Jan 17, 2012.

  1. Toucan

    Toucan Member

    I intend to create a directory on another partition and create a symlink to it from various other users websites with the intention they can use it as a large storage area for images that is shared between them.

    These sites normally are suexec settings.

    Ideally I would like to allow all users to add and modify their own files here but read only on other peoples files.

    Does anyone have advice on how I can achieve this please?

  2. rafael-ec

    rafael-ec New Member

    If all files are in the same directory make sure to allow the group to write on the directory and chown the directory 770. All users should belong to the same group.

    Every user could create their own files and would not be able to modify others files. The downside is that any user can modify the directory and that means they could delete others files.

    Other option is to create a directory own by the same group and have 750 priviligies. Inside that directory create a directory for each user make sure they are own by the user and the group. Then all users in that group could read others files and could only create files in their own directory.

    I hope this helps.


  3. Toucan

    Toucan Member

    Thanks, it does help me understand the issues a bit better. The problem i foresee is with the groups. As i understand it, ispconfig assigns groups based on the client ie, web23 and web24 are users of group client9. So i don't know how I could allow different clients to share the same pool of directories.
  4. rafael-ec

    rafael-ec New Member

    How are your clients going to upload the files? ftp or via a web application? Maybe a web application is a best option. I can't think of one at the moment, but I once use egroupware and that had a file manager module for users to manage files. It really depends on your needs and what are you trying to do.

    A client can have several ftp users and all of them would belong to the same group. I am knew in ISP Config 3, so I may be wrong.

    You can always create another group and add the users to that group. Take a look to the following commands:

    However I am not really sure what you want to do. If you have huge new partition or hardrive, you could mount that partition in /var/www

    That way all your sites and data from the sites (except mysql that is in /var/lib/mysql) would be store in your big partition. That way for ISPConfig everythig is normal. However, you would need o do something like this.
    Rename the /var/www directory to something else (ex /var/www-back
    Create a new /var/www directory
    Copy or rsync the files back to /var/www that is using your new partition
    Save the new partition configuration in /etc/fstab to check that everything is ok.

    Depending on the amount of data you may have a big or a little downtime. This are just some ideas I am thinking on while I am writing. Let us now how it goes.



Share This Page