[cs631apue] A few questions

Jan Schaumann jschauma at stevens.edu
Wed Sep 25 23:15:45 EDT 2019


Devharsh Trivedi <dtrived5 at stevens.edu> wrote:
 
> 1. Can we use group permissions for access
> protection instead of using sticky bits?

I'm afraid I don't understand this question.

The protection of the file is encoded in the st_mode
of the struct stat.  That includes the user as well as
the group permissions as well as any additional bits
being set, such as the sticky bit.

The sticky bit does not come into play when it comes
to permissions or granting access, however:

For text files, the sticky bit will retain the text
segment of the executable in memory after the process
terminates, so as to speed up loading of the
executable the next time the program runs.

For directories, setting the sticky bit changes the
semantics such that only the owner of the file can
remove the file in the directory.  (Recall that
without the sticky bit set, anybody with write access
to the directory can remove files in it, regardless of
the permissions on the file.)

The group permission bits are applied if the user
trying to access the file is not the owner but is a
member of the group with the GID == st_gid.

> 2. What is screen (S) user permission?

There is no "screen".

The 'S' may show up in the strmode(3) representation
of the file permissions as noted in the manual page:

     S     If the character is part of the owner
           permissions and the file is not executable
           or the directory is not searchable by the
           owner, and the set-user-id bit is set.

> 3. Can you please share some reference material for
> creating my own AMI on Amazon EC2 from a ISO image?

https://duckduckgo.com/?q=create+custom+ec2+ami+image+netbsd

First link:
https://wiki.netbsd.org/amazon_ec2/build_your_own_ami/

You can also find instructions on how to convert a
Virtualbox image to an EC2 AMI, but either approach
requires a fair understanding of the EC2 command-line
tools and eco system, which is outside the scope of
this class.

-Jan


More information about the cs631apue mailing list