renko képe

1.) Fajlok eleresenek megadasa
$ ls -Z file1
-rw-rw-r-- user1 group1 unconfined_u:object_r:user_home_t:s0 file1

chcon -t samba_share_t file1

$ ls -Z file1
-rw-rw-r-- user1 group1 unconfined_u:object_r:samba_share_t:s0 file1

Visszaalitas : /sbin/restorecon -v file1

2.) Mapak es a benuk levo ossze terulet elerhetove tevese
$ ls -dZ /web

chcon -R -t httpd_sys_content_t /web/

# ls -dZ /web/
drwxr-xr-x root root unconfined_u:object_r:httpd_sys_content_t:s0 /web/
# ls -lZ /web/
-rw-r--r-- root root unconfined_u:object_r:httpd_sys_content_t:s0 file1
-rw-r--r-- root root unconfined_u:object_r:httpd_sys_content_t:s0 file2
-rw-r--r-- root root unconfined_u:object_r:httpd_sys_content_t:s0 file3

Visszaalitas : # /sbin/restorecon -R -v /web/

http://docs.fedoraproject.org/en-US/Fedora/13/html/Security-Enhanced_Lin...

Tags: