Skip to content

Commit 98f5816

Browse files
committed
be more precise about which program gives a warning when
deleting file without write permission. also, place the note about delete operation to separate item
1 parent e9a99f1 commit 98f5816

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

user-access.tex

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,19 @@
244244
application meant total control of the system. To thwart this, these systems
245245
employ models like \emph{least privilege} in Solaris or \emph{privilege
246246
separation} and \emph{pledge} in OpenBSD.
247+
\item \emsl{Unix systems do not have delete-like
248+
operation for a file}, the file is deleted automatically once it is no longer
249+
referenced from a directory structure and the file is not presently open by any
250+
process (see \example{unlink/unlink.c}).
247251
\item \label{FILEDELETE} In order to delete a file, the user has to have write
248252
permission for the \emsl{directory} containing the file, because that is actually
249253
the ``file'' being changed. \emsl{The rights of the file to be deleted are
250-
not relevant}; the shell might give you a warning that you are about to delete a
254+
not relevant}; the \texttt{rm} command (or shell, if the command is built in)
255+
might give you a warning that you are about to delete a
251256
file for which you do not have the right to write, however that is just a
252257
warning, the operation will proceed. It is quite logical -- if you set a file
253-
as read-only the shell will deduce that you probably do not want to delete such
254-
a file. See the example below. \emsl{Unix systems do not have delete-like
255-
operation for a file}, the file is deleted automatically once it is no longer
256-
referenced from a directory structure and the file is not presently open by any
257-
process (see \example{unlink/unlink.c}).
258+
as read-only then you probably do not want to delete such a file.
259+
See the example below.
258260

259261
\begin{verbatim}
260262
$ whoami

0 commit comments

Comments
 (0)