[cs631apue] A few questions

Elliot Wasem ewasem at stevens.edu
Sun Sep 29 18:06:32 EDT 2019


This seemed like the appropriate thread to ask on.

When it comes to sorting for the midterm ls, I'm aware that related flags override each other (-r overrides default -l order, -u and -c override each other, etc.), but it's unclear to me how non-related flags behave. For example, if -ltSc is specified, does the -c override the -S? Or does it sort by -c then, in cases where two files have the same ctime, sort those two by -S? Similar question for the case where the order is instead -ltcS.
Thanks,
Elliot Wasem
https://elliotwasem.xyz (https://link.getmailspring.com/link/9610B861-BE47-4C9A-A3AF-9622FA738689@getmailspring.com/0?redirect=https%3A%2F%2Felliotwasem.xyz&recipient=Y3M2MzFhcHVlQGxpc3RzLnN0ZXZlbnMuZWR1)

On Sep 25 2019, at 11:15 pm, Jan Schaumann <jschauma at stevens.edu> wrote:
> 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://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fduckduckgo.com%2F%3Fq%3Dcreate%2Bcustom%2Bec2%2Bami%2Bimage%2Bnetbsd&amp;data=02%7C01%7Cewasem%40stevens.edu%7Cbc64da37e815455d747b08d7422fcf9c%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637050645437775836&amp;sdata=whO53KBNumDpUJe%2Bw4wjgDkxCwlHldoW30AtBUItedA%3D&amp;reserved=0
> First link:
> https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.netbsd.org%2Famazon_ec2%2Fbuild_your_own_ami%2F&amp;data=02%7C01%7Cewasem%40stevens.edu%7Cbc64da37e815455d747b08d7422fcf9c%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637050645437775836&amp;sdata=WaUBJPUZgHnmgPukwgqp4JREoaxTkC2aScr799%2BlXbM%3D&amp;reserved=0
>
> 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
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs631apue
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20190929/4e1e8702/attachment.html>


More information about the cs631apue mailing list