A Linux system administrator needs to configure permissions for a newly deployed web application directory at `/var/www/app`. The administrator must recursively change the ownership of all files and subdirectories within `/var/www/app` to the user `appuser` and the group `webgroup`. Additionally, the administrator must recursively restrict directory access so that only the owner has full read, write, and execute permissions, while group and other users have no permissions. Which TWO of the following commands must the administrator execute to fulfill these requirements?
- chown -R appuser:webgroup /var/www/appCevap
- chmod -R 700 /var/www/appCevap
- Cchown -r appuser:webgroup /var/www/app
- Dchmod -u 700 /var/www/app
Cevap
The administrator must execute `chown -R appuser:webgroup /var/www/app` to set file ownership recursively and `chmod -R 700 /var/www/app` to set file permissions recursively.
The command `chown -R appuser:webgroup /var/www/app` correctly updates the user and group ownership recursively across the directory structure. The command `chmod -R 700 /var/www/app` correctly sets read, write, and execute rights for the owner while revoking all permissions for group and others across all contained files and directories.
Adım Adım Çözüm
Anahtar Kavram
Linux recursive file access control using chown and chmod
Tahmini Süre:1m 30s