Wednesday, January 30, 2013

File Access and File Permissions

In C there are two main ways to access files. The first is through file descriptors, which use a set of low-level I/O functions. The second is through filestreams which is a higher-level way to access that is based on the lower-level functions. The file descriptors are more direct to program. A file descriptor is represented as a number that is used to reference open files. 

When a file is newly created, permissions can be set for different groups. There are three different groups that permissions can be turned on and off for: user, group, and other. The description of these groups are pretty straightforward. 'User' refers to the permissions the owner has, 'group' refers to the permissions a specified group has, and 'other' refers to the permissions everyone else has. Each user on a Unix system has a unique ID that is associated with them. This makes it possible to keep track of which permissions particular users can have. 

No comments:

Post a Comment