Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Upload Files not owned by/gehören nicht dem User

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Lupus_caoticus
Posts: 3
Joined: 2008-09-25 09:28
Contact:

Upload Files not owned by/gehören nicht dem User

#1 Post by Lupus_caoticus »

Hallo,
ich habe ein Probel mit vsftpd unter debian etch.

Ich habe vsftpd installiert und configuriert.

Localer User können sich per ftp einlogen.
Locale User können daten überschreiben.

Aber wenn ein localer user eine neue datei erstellt oder eine hochläd die noch nicht auf dem server lag,
dann gehören diese danach nicht ihm selbst sondern einem user der nur aus Zahlen besteht, die Gruppe ist allerdings bei dieser neuen datei ist die des Users.

Ich hätte es aber gerne so das eine datei die hochgeladen/erstellt wird auch dem User gehört der das getan hat und nicht nur seiner gruppe.

Anscheinend ist das Aber kein Problem sondern eine Standardeinstellung.
da ich dann zum Testen auch mal bftpd installiert habe und dort das selbe problem hatte.

Kann mir da irgendjemand weiterhelfen?

Habe jetzt auch schon mehrere stunden im I-Net gesucht und keine Änlichen meldungen gefunden.

------------------------------------------------------------------
Hallo,

I have a Problem with vsftpd on a debian etch Server.

I Have vsftp installed and Configured.

Local user are able to log in.
Local user are able to overide Files and Folders.

If a user creates a new file or folder this file or folder will be owned automaticaly by a user that does not exist ( username are only numbers)
but tho owned group is the right ( the Group of the user that have uploaded the file)

But, the new file or folder schoud be owned by the user (the user that have created the file) to.

I think this a standard configuration becouse i have installed bftpd to test
and the Problem is the same.

I am serarching since days on the Internbet but i dont fount any way to solve.


MFG Lupus

User avatar
BioTube
Posts: 7520
Joined: 2007-06-01 04:34

#2 Post by BioTube »

I don't know of a proper solution, but a cron script can work as a hotfix; put a script containing this

Code: Select all

#!/bin/sh
chown [targetuser] -R /path/to/folder
into /etc/cron.daily(any name should do). Make sure to make it executable

Code: Select all

chmod 755 /etc/cron.daily/fixusrs.sh
Or whatever you named your script.
Image
Ludwig von Mises wrote:The elite should be supreme by virtue of persuasion, not by the assistance of firing squads.

Lupus_caoticus
Posts: 3
Joined: 2008-09-25 09:28
Contact:

#3 Post by Lupus_caoticus »

BioTube wrote:I don't know of a proper solution, but a cron script can work as a hotfix; put a script containing this

Code: Select all

#!/bin/sh
chown [targetuser] -R /path/to/folder
into /etc/cron.daily(any name should do). Make sure to make it executable

Code: Select all

chmod 755 /etc/cron.daily/fixusrs.sh
Or whatever you named your script.

but i dont have a "/path/to/folder" becouse it is not a problem on a special folder.

Every File that will be uploaded shoud be owned by the User zhat have uploadet it. Everyware in the system.


and what is whit this folder /etc/cron.daily/ what does it?

User avatar
BioTube
Posts: 7520
Joined: 2007-06-01 04:34

#4 Post by BioTube »

Scripts in /etc/cron.daily are run automatically once a day. As for the UID, this is set by the uploading computer numerically. The simplest solution would be to create the user accounts on the server, ensuring that the numerical UID is equal to that on the others.
Image
Ludwig von Mises wrote:The elite should be supreme by virtue of persuasion, not by the assistance of firing squads.

Lupus_caoticus
Posts: 3
Joined: 2008-09-25 09:28
Contact:

#5 Post by Lupus_caoticus »

BioTube wrote:Scripts in /etc/cron.daily are run automatically once a day. As for the UID, this is set by the uploading computer numerically. The simplest solution would be to create the user accounts on the server, ensuring that the numerical UID is equal to that on the others.
okey now i understand what you mean but this is only a workaround and iám serching for an solution.

Again The Problem is at example i create a user called mike with the password mike123 i create a folder in his Home directory and mount an external USB Stick (ext3) intwo this folder this.

--------------------------------------------------------
Deep Name Owner Group Oktal-Rights

-\ home/ root root 755
--| ../
--\ mike/ mike mike 755
---| ../
---\ USB/ root root 777
----| ../
--------------------------------------------------------

now i am going to log in over ftp with mike

then i will create some directories and files
and it will lock like this:

--------------------------------------------------------
Deep Name Owner Group Oktal-Rights

-\ home/ root root 755
--| ../
--\ mike/ mike mike 755
---| ../
---| /NewFile.txt 2519570096 mike 644
---\ NewFolder/ 2530703312 mike 755
----| ../
---\ USB/ root root 777
----| ../
----| /NewFile.txt 2519570096 mike 644
----\ NewFolder/ 2530703312 mike 755
--------------------------------------------------------

what means this 2519570096 and this 2530703312 user ?
and becouse of what the files aren't owned by mike?

Post Reply