Ниже вы видите, как я создаю тестовую папку и изменяю право собственности на эту папку на другого пользователя. Я не могу создать файл, если каталог не принадлежит мне. Аналогично, как testuser, я не смог удалить тестовый файл, принадлежащий моей учетной записи. Но, как вы видите, если пользователь может запустить sudo, этот пользователь может изменить право собственности на папку, изменить права доступа к файлам и, следовательно, - просмотреть и изменить файл
$ mkdir tester
$ chown testuser:testuser tester/
chown: changing ownership of ‘tester/’: Operation not permitted
$ sudo chown testuser:testuser tester/
[sudo] password for xieerqi:
$ ls -l tester
total 0
$ touch tester/testfile
touch: cannot touch ‘tester/testfile’: Permission denied
$ sudo chown xieerqi:xieerqi tester/
$ touch tester/testfile
$ chmod 700 tester/testfile
mksh: chmod: can't execute: Permission denied
$ sudo chmod 700 tester/testfile
$ sudo su testuser
testuser@foo $ ls -l tester/testfile
-rwx------ 1 xieerqi xieerqi 0 May 2 08:46 tester/testfile
testuser@foo $ rm tester/testfile
rm: remove write-protected regular empty file ‘tester/testfile’?
testuser@foo $ ls -l tester/testfile
-rwx------ 1 xieerqi xieerqi 0 May 2 08:46 tester/testfile