First you really should
know something about permissions. After that you just use a recursion..if you wanted to make the new owner of those files be tripmix
, and the files would reside in /mnt/somedir/
, you could simply use (change the directories and owner name according to your own configuratoin):
chown -R tripmix /mnt/somedir
Or use chmod
to se up read/write/execute permissions. Ownership is changed with chown
EDIT: sorry it was a big -R not a small -r in the codeline
EDIT II: the files are probably owned by user root and group root, so if you wanted, you could alter the group too:
The above would go recursively through /mnt/somedir (i.e. working on every file and subdirectory), changing the owner of the files to be tripmix (the name before ":") and changing the group those files are owned by to be tripmix (the name after ":"). The group ownership is not a "must" to be changed, especially if it's root - the point is, it shouldn't be any such group that everybody can get access to.
chown -R tripmix:tripmix /mnt/somedir
Removing read, write and execution permissions from every other user than the owner and those belonging to the owning group would go like:
if you liked. You should read
chmod -R o-rwx /mnt/somedir
to get more information. It's a really good idea to be aware of how users and groups work and affect the file usage, and how they are set up - simply because it's a big part of the security of your system.