Выполненный двоичный файл автоматически как корень

GoGrid предлагает услугу, которая скопирует Ваши данные в Карту памяти и поставит их Вам?

Раз так затем можно поставить диск Amazon, они смонтируют его и скопируют данные в готовую к употреблению учетную запись S3. Это также избегает, чтобы трафик взимал за передачу файлов.

Больше информации об услугах Amazon может быть найдено по http://aws.amazon.com/importexport/

1
задан 8 September 2012 в 05:28
2 ответа

chown changes the owner, it doesn't make the binary run as the file owner. chmod u+s will do that however. chmod g+s will make the binary run with the file group permission on some systems as well (you don't mention what system you're running). These flags have very different effects on other files and especially folders. You should take a good long look at man chmod and man chown before diving in.

Also you should strongly consider using sudo instead of making the binary suid. When a binary is suid, anyone who can access the binary can run it as the file's owner. If you accidentally give a normal user write permissions to the binary, then they could replace it with anything that want and run it as root. sudo solves these security problems at the cost of requiring the user to prepend sudo to commands they want to run as root. You also have to setup the sodoers file with approproiate permissions.

1
ответ дан 4 December 2019 в 00:59

Выполнить: - visudo (Для редактирования файла конфигурации): -

Затем отредактируйте файл конфигурации, т.е. файл sudoers: - ИМЯ ПОЛЬЗОВАТЕЛЯ ALL = NOPASSWD: /path/to/binaryfile.

Сохраните файл, после чего вы можете запустить двоичный файл без запроса пароля, выполнив команду: -

sudo "для запуска двоичного файла ".

0
ответ дан 4 December 2019 в 00:59

Теги

Похожие вопросы