خرید بک لینک

I am probably missing something very basic here so maybe someone can help:

I have a file that I want do move from one folder to another. The file is created by the user jd and the group download. I work as the user maximilian. maximilian has the primary group maximilian and also is in the groups download and media. So I use the following commands:

Code:

sudo chown maximilian:media file
chmod 660 file
mv file /new/folder
The destination folder is owned by maximilian:media
But after I move my file it is suddenly owned by maximilian:maximilian.

But if I use

Code:

sudo mv file /new/folder
the file stays owned by maximilian:media

Can someone explain me what is happening there? If I move a file owned by a user and group to a folder belonging to the same user and group should it not stay the same?

.

برچسب: نویسنده: استخدام کار تاريخ: شنبه 5 تير 1395 ساعت: 23:30

صفحه بندی