Linux and permissions/ownership

Maximilian

Lifer
Feb 8, 2004
12,604
15
81
So a program creates a new folder called "myfolder" on a drive owned by me. I own everything on this drive. However myfolder because it was created by a program and not me is owned by root. This is linux mint 16.

How can I make it so that whenever anything new is created on this drive I am the default owner?

If it helps to know the reason I want this is because I cannot administer new files/folders on the server from my windows PC due to permissions. I have to VNC in and take ownership of folders like myfolder, at which point its kind of a waste of time because I can move/change/whatever the folder over VNC anyway.
 

theevilsharpie

Platinum Member
Nov 2, 2009
2,322
14
81
Make your personal group the group owner of the directory, and then set the setgid bit on the directory. This will replace the group owner of any files and subdirectories with your personal group, regardless of what created the file.
 

Maximilian

Lifer
Feb 8, 2004
12,604
15
81
Make your personal group the group owner of the directory, and then set the setgid bit on the directory. This will replace the group owner of any files and subdirectories with your personal group, regardless of what created the file.

If its this kinda thing you mean (I didnt under stand a lot of what you said sorry):

x0flPk6.png


Clicking apply to enclosed folders only solves it one time. As soon as a new folder is created after that then ill have to keep coming back and doing this because the new folder will belong to root.
 

Elixer

Lifer
May 7, 2002
10,371
762
126
Um, you shouldn't be running a 'normal' program as root, that is the problem.

You need to see why that program is being run by root.
 

Maximilian

Lifer
Feb 8, 2004
12,604
15
81
Um, you shouldn't be running a 'normal' program as root, that is the problem.

You need to see why that program is being run by root.

Its started automatically by this thing:

vU4ytuc.png


Its transmission, the torrent client.
 

Elixer

Lifer
May 7, 2002
10,371
762
126
Bah.
OK, then run the configuration program for that, and fix it there.
(I have never used mint, or that program, but, it should have a config file someplace...)