unioslo / tsdfx

File transfer utility
Other
4 stars 3 forks source link

Copying changes group ownership #91

Closed dag-erling closed 8 years ago

dag-erling commented 8 years ago

In tsdfx_copy_new(), if the source file's UID maps back to a known user, the file is copied with that user's credentials, which means that the destination file's GID will be set to the user's primary file group, which is not necessarily the same as the source file's GID, and causes problems for some users. The destination file's GID should be the same as the source file's GID as long as the source (and destination) file's UID maps to a user which is a member of that group.

petterreinholdtsen commented 8 years ago

A related problem is in the scanner, where the scan process is running as the owner and group of the scanners toplevel directory, without the rest of the group membership of the owner. This causes problems if a parent directory is owned by someone else and its group is not the same as the scanners toplevel directory. I saw this with the export directories, being located in /tsd/server/project/fx/export/. If the export directory is owned by some non-root user, the scanner stop working because the group of project/ is p-member, while the group of export/ is p-export-member/.

petterreinholdtsen commented 8 years ago

The copy issue seem to be solved in commit c3823f32a0c2ae85f7000227fab3bacbb5210be3 . Am I mistanken?

dag-erling commented 8 years ago

Yep, and 8ead78e fixed the scanner issue.