Question:
grant authority in UNIX?
Jmmhdrx
2011-07-15 22:43:36 UTC
I have made a user named 'AAA' in UNIX.
I want to grant authority that AAA can delete and upload files.
What should I do?
Three answers:
Tweeter & the MonkeyMan
2011-07-15 23:20:37 UTC
The basic file permissions you can give are Read, Write and Execute.

But - in Unix/Linux, you usually assign permission to a file (or directory, subdirectory, volume, device.. so some "container" of file).

You can use the CHMOD command, and treat each permission as a binary :

RWX can be off (0) or on(1). In binary then, Read only is 100, or 4.

Read and write is 110, or 6

Execute is 001, or 1.. (but rarely have I ever seen execute on a file you can't read or write to)



The command also looks at Owner[RWX] Owner's Group[RWX] Everyone else [RWX]

so a command like

> chmod 664

means I am giving the owner of that file, and everyone in the same group as that user Read and Write access, and everyone else gets Read-only.



If you just want to bypass all the security for this user, then add AAA to the root group or Administrators group. In most cases, that will give your user universal access to read and write.. also to possibly mess things up.



If this was an assignment, then just say you would use CHMOD on the files/directories and use the argument 6xx ( we need the 6 for Read+Write, but the other two for group and everyone aren't specifically needed. We could - possibly - put any octal number in those 'x' places. ) If AAA is not the owner of those resources, then you could

change the owner: chown

or assign AAA to a group that does own the resources,

or - give AAA super-user rights by putting that user in a group like 'root', or giving that user the ability to -SU anytime they want (share that password).



For a real-life use, set up a folder or volume that AAA can upload/download all they need to, and make AAA the owner with 664 rights. ( by default, I usually allow anyone to read - so they know what they are missing... you could use 660)

That way, AAA doesn't have rights all over your system and can't accidentally mess anything up - while at the same time, you grant some clear file space so AAA can do the file work needed.
?
2011-07-16 05:57:13 UTC
A user can delete or upload files if he/she has write permission for the directory where the files are located.
Bobo
2011-07-16 06:01:25 UTC
go into it and type "su" in teminal it will ask for a password this is root password and will give root privaleges if your too lazy to do that everytime change aaa's uuid


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...