TheCreeper

Members
  • Posts

    1
  • Joined

  • Last visited

TheCreeper's Achievements

New User

New User (1/3)

  1. In the Linux builds of the application i've run into a problem with sycning files for multiple users. The SyncApp will give ownership of all synced files to the user the process was running under. This creates a bit of a problem. If the application was say running as root (in a perfect world everyone would create a user for each new daemon application) and you have added a new `sync` it will then begin creating files and filling them with data at the pre-defined location which might by your home folder located at `/home/MagicalTux`; there is one problem with this and it's that you cant access them files and folders because ownership has being assigned to the root user (the user the process was running under). One workaround for this problem would be to create a new user (remember what we talked about with creating a new user for each new daemon application?) with a name such as `btsync` and create a group with the exact same name as well as assign the new group as the default group of that user (useradd -b "/home/" -U -m MagicalTux) . Now that we have created a new user we can then add exsisting users into the `btsync` group so when it creates new files and folders we can then access them because we are under the same group as the `btsync` user (the user the process is running under) however there is one problem with this and its that btsync does not give group permissions beyond read and execute so we can not write to the files that have being synced. So if we cant write to the files perhaps we could manually the change permissions?; at the point it begins to get a bit messy. We could create a cronjob that gets elevated to root, navigates to our sync directrory, and gives ownership of everything (files and folders) to the user (MagicalTux) or change the group permissions to include write access. Ideally the SyncApp will on its own do one of three possible things to solve this issue. Change the default group permissions for files and folders to include write permissions, find who owns the sync folder and give ownership of everything inside of it to that user once sycning has completed, or spawn a child process under the user who owns the sync folder which is then responsible for sycning all files in that folder for that user. Perhaps other people have different solutions to this problem?