|
244 | 244 | application meant total control of the system. To thwart this, these systems |
245 | 245 | employ models like \emph{least privilege} in Solaris or \emph{privilege |
246 | 246 | 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}). |
247 | 251 | \item \label{FILEDELETE} In order to delete a file, the user has to have write |
248 | 252 | permission for the \emsl{directory} containing the file, because that is actually |
249 | 253 | 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 |
251 | 256 | file for which you do not have the right to write, however that is just a |
252 | 257 | 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. |
258 | 260 |
|
259 | 261 | \begin{verbatim} |
260 | 262 | $ whoami |
|
0 commit comments