Change ownership on SFTP Upload (overwrite), opensshd

Ολοκληρωμένο Αναρτήθηκε Apr 15, 2015 Πληρώθηκε κατά την παράδοση
Ολοκληρωμένο Πληρώθηκε κατά την παράδοση

When I upload files through SFTP, files keeps their owner-bit [url removed, login to view] instance, if user A uploads a file, then user B overwrites it, user A still is the owner of the file (both users belong to same group). Same thing happens from basic shell.

I only have this problem on overwrite.

I would prefer to handle this already on Upload, though a patch to opensshd/SFTP-deamon, that does "chmod thisuploadinguser uploadedfile" when it's done or "rm deletefilebeforeUploadIsDone" (if the file was removed just before he/she uploads, it would also solve my problem).

I have also experimented on inotify on a certain directory and inotify works. However, it doesn't report the actual owner, just the path/file name. If what had worked, I could just do a "chown username changedfile".

I have activated logging of SFTP (that seams to report READ APPEND on these events), so a combination of INOTIFY-wait on the /home dir along with a log-search migth be a solution...

I need to solution to work fast when triggered (as sftp can transfer a lot of files). I do not prefer to have a script going through the entire dir-tree again and again.

So, if you know a solution, feel free to share it :)

Note: Should use Webdrive as SFTP-client (or another client, but it has to support drive mapping and user friendly install in Windows)

Γλώσσα Προγραμματισμού C Linux Python Δέσμες Εντολών Γλώσσας Υπολογιστή Διαχείριση Συστήματος

Ταυτότητα Εργασίας: #7488906

Σχετικά με την εργασία

2 προτάσεις Απομακρυσμένη εργασία Ενεργό Apr 15, 2015

Ανατέθηκε στον:

unixadminpro

Hello Sir, I am a professional System and Network Administrator. Ive got more than 13 years behind my back doing that. Let me help you and I promise you will be happy with my solutions!

$50 USD σε 1 μέρα
(9 Αξιολογήσεις)
2.3

2 freelancers κάνουν προσφορές κατά μέσο όρο $108 για αυτή τη δουλειά

rohitkarwa

A proposal has not yet been provided

$166 USD σε 3 μέρες
(0 Αξιολογήσεις)
0.0