The approach works with chmod and chown and other tools. Note that chown -R affects directories and files, that's why you need an approach that can tell them apart. Each category has three permissions that can be set: r, w, and x to read, write, and execute a file, respectively. You may want to do these changes recursively. Understanding File Permissions There are three user categories: User (the owner of the file), Group (the security group you are in), and Other (for the world to see). You may want to set the directory ownership and permissions in a similar, yet somewhat different manner. Any answer that advises you to make bob the owner must consider this flaw. How to set ACLs To set file and directory level permissions, see any of the following articles: Important If the security principal is a service principal, it's important to use the object ID of the service principal and not the object ID of the related app registration. You could do this the other way around: # but don't! explanation belowīut then bob as the owner would be able to chmod and give himself excessive permissions or to take them away from the ubuntu group, or to mangle with "everyone else's" permissions. This way ubuntu has all the permissions and bob (as the sole member of bob group) can only read the file. This makes the following trick possible: sudo chown ubuntu:bob fileA Each digit of the permissions number may be a sum of 4, 2, 1 and 0: 0 (0+0+0) No permission. Such group by default contains only its corresponding user. The write, read, and execute permissions have the following number value: r (read) 4 w (write) 2 x (execute) 1 no permissions 0 The permissions digit of a specific user class is the sum of the values of the permissions for that class. In Ubuntu each regular user has their own group by default. This doesn't change much in my answer though. I don't know whether you refer to the root user or to some regular user ubuntu which you consider a root user for the purpose of your game.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |