Welcome to the Linux Foundation Forum!

LFS201 19.2 Lab mistake?

alekulyn
alekulyn Posts: 5

I think I may have found a potential mistake. On step 5, the command

sudo chcon -t admin_home_t file2.html

is run. According to "man chcon", the '-t' parameters sets a type.
Shouldn't the command then be

sudo chcon -t httpd_sys_content_t file2.html


 

Comments

  • luisviveropena
    luisviveropena Posts: 1,248
    edited January 2017

    Hi,

    I don't see a 19.2 lab, it's only 19.1. Can you check the right section, please?

    Thanks,

    Luis.

  • alekulyn
    alekulyn Posts: 5
    edited January 2017

    Luis,

    In the dropdown, I see two labs, though, interestingly, they're both marked as 19.16 .  The link of the pdf of the second lab is here: https://lms.360training.com/scorm/799658/Lab 19.2.pdf

  • luisviveropena
    luisviveropena Posts: 1,248
    edited January 2017

    Hi Alekulyn,

    I reviewed it again and can't see it. Can you attach a screenshot of it, please?

    Thanks,

    Luis.

  • Hey Luis,

    Sorry for the late reply.  Here's the screenshot: https://imgur.com/a/uVeXh

    The mistake is the last command.

  • Hi Alekulyn,

    I don't think it's wrong, because it first creates one file under the document root directory, and it can be seen (file1.html). Then it creates another file (file2.html) under the root directory file, so it's moved to the document root directory and then it can't be seen due the security context.

    Regards,

    Luis.

  • mobile
    mobile Posts: 15

    Just perusing. My 2 cents.

    Downloaded from LSF201 complete lab list pdf. Completing labs on CentOS 7 (3.10.0-514.6.1.el7.x86_64)

    19.2 Step 5: Change command from 'sudo chcon -t admin_home_t file2.html' to 'sudo chcon -t httpd_sys_content_t' (or whatever the default file context is of /var/www/html on your system)

    You also could use restorecon on the /var/www/html directory after moving the file, use mv -Z instead of mv, etc.

    Reference: LSF201

    19.8: SELinux Context Inheritance and Preservation - the lab instructions said to create the file2.html in the root home directory and move it to /var/www/html with the intent to display parent directory context type inheritance.

Categories

Upcoming Training