semanage not changing file contextSelinux: Managing ports; Semanage command not foundLinux - CentOS6 - semanage - command not foundCan't make SELinux context types permanent with semanageRHEL SELinux context differs between matchpathcon and restoreconConfiguration for Ubuntu SELinux with sshdSelinux “Add context Rule to Semanage”Trouble automounting NFS share on Centos 7Change selinux context for TLS cacert.pemCentOS 7 custom service failure (Interactive authentication required)Getting compiled Python mod_wsgi module working on Apache server with SElinux enforcing mode

Remove everything except csv file Bash Script

How to slow yourself down (for playing nice with others)

Early arrival in Australia, early hotel check in not available

Should these notes be played as a chord or one after another?

Why was this sacrifice sufficient?

Two researchers want to work on the same extension to my paper. Who to help?

Does Lawful Interception of 4G / the proposed 5G provide a back door for hackers as well?

Why does the Earth follow an elliptical trajectory rather than a parabolic one?

To what extent may I customize a demiplane?

How could we transfer large amounts of energy sourced in space to Earth?

Is the homebrew weapon attack cantrip 'Arcane Strike' balanced?

Guns in space with bullets that return?

Is calcium chloride an acidic or basic salt?

What food production methods would allow a metropolis like New York to become self sufficient

How to make a Lich look like a human without magic in 5e?

Is it a Munchausen Number?

The lexical root of the perfect tense forms differs from the lexical root of the infinitive form

How old is Captain America at the end of "Avengers: Endgame"?

Would an 8% reduction in drag outweigh the weight addition from this custom CFD-tested winglet?

Noob at soldering, can anyone explain why my circuit won't work?

Was the Highlands Ranch shooting the 115th mass shooting in the US in 2019

Delta TSA-Precheck status removed

Control variables and other independent variables

Is there a need for better software for writers?



semanage not changing file context


Selinux: Managing ports; Semanage command not foundLinux - CentOS6 - semanage - command not foundCan't make SELinux context types permanent with semanageRHEL SELinux context differs between matchpathcon and restoreconConfiguration for Ubuntu SELinux with sshdSelinux “Add context Rule to Semanage”Trouble automounting NFS share on Centos 7Change selinux context for TLS cacert.pemCentOS 7 custom service failure (Interactive authentication required)Getting compiled Python mod_wsgi module working on Apache server with SElinux enforcing mode






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















On my centos 7 machine, I have the following information:



[wmsodbc]> pwd
/WMSData1/tomcat/latest
[wmsodbc]> ls -lrt /WMSData1/tomcat/latest
lrwxrwxrwx. 1 tomcat tomcat 37 May 2 19:26 /WMSData1/tomcat/latest -> /WMSData1/tomcat/apache-tomcat-8.5.37
[wmsodbc]> ls -ltd logs
drwxr-xr-x. 2 tomcat tomcat 4096 May 10 13:05 logs
[wmsodbc]> ls -lZd logs
drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
[wmsodbc]>


I have tried many times to set the file context to var_log_t, but it does not take. See attempts below. All steps taken from various websites online. First of all, attempt 1:



[wmsodbc]> ls -lZd logs
drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
[wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
# This file is auto-generated by libsemanage
# Do not edit directly.

/WMSData1/tomcat/latest/logs(/.*)? system_u:object_r:var_log_t:s0
[wmsodbc]> sudo restorecon -vR logs/
[wmsodbc]> ls -lZd logs
drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
[wmsodbc]>


And attempt 2, using a slightly different method:



[wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
# This file is auto-generated by libsemanage
# Do not edit directly.

[wmsodbc]> ls -lZd logs
drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
[wmsodbc]> sudo chcon system_u:object_r:var_log_t:s0 /WMSData1/tomcat/latest/logs/
[wmsodbc]> ls -lZd logs
drwxr-xr-x. tomcat tomcat system_u:object_r:var_log_t:s0 logs
[wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
# This file is auto-generated by libsemanage
# Do not edit directly.

[wmsodbc]> sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/latest/logs(/.*)?'
[wmsodbc]> ls -lZd logs
drwxr-xr-x. tomcat tomcat system_u:object_r:var_log_t:s0 logs
[wmsodbc]> sudo restorecon -v -R logs/
restorecon reset /WMSData1/tomcat/apache-tomcat-8.5.37/logs context system_u:object_r:var_log_t:s0->system_u:object_r:default_t:s0
[wmsodbc]>


So what am I doing wrong? Obviously, chcon is temporary. But it works, unlike semanage, in changing file context. And then we clearly see restorecon changing it back to "default_t". So a second question would be why is it changing it back to "default_t"?



Could it be the fact that "latest" is a softlink and semanage does not like softlink in the full path? I think I MIGHT have gotten it to work by going directly to directory "latest" points to and using THAT absolute path, but waiting to see if it fixes my issues. If someone could point me to proof that this is the issue, that would be great.










share|improve this question






























    2















    On my centos 7 machine, I have the following information:



    [wmsodbc]> pwd
    /WMSData1/tomcat/latest
    [wmsodbc]> ls -lrt /WMSData1/tomcat/latest
    lrwxrwxrwx. 1 tomcat tomcat 37 May 2 19:26 /WMSData1/tomcat/latest -> /WMSData1/tomcat/apache-tomcat-8.5.37
    [wmsodbc]> ls -ltd logs
    drwxr-xr-x. 2 tomcat tomcat 4096 May 10 13:05 logs
    [wmsodbc]> ls -lZd logs
    drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
    [wmsodbc]>


    I have tried many times to set the file context to var_log_t, but it does not take. See attempts below. All steps taken from various websites online. First of all, attempt 1:



    [wmsodbc]> ls -lZd logs
    drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
    [wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
    # This file is auto-generated by libsemanage
    # Do not edit directly.

    /WMSData1/tomcat/latest/logs(/.*)? system_u:object_r:var_log_t:s0
    [wmsodbc]> sudo restorecon -vR logs/
    [wmsodbc]> ls -lZd logs
    drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
    [wmsodbc]>


    And attempt 2, using a slightly different method:



    [wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
    # This file is auto-generated by libsemanage
    # Do not edit directly.

    [wmsodbc]> ls -lZd logs
    drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
    [wmsodbc]> sudo chcon system_u:object_r:var_log_t:s0 /WMSData1/tomcat/latest/logs/
    [wmsodbc]> ls -lZd logs
    drwxr-xr-x. tomcat tomcat system_u:object_r:var_log_t:s0 logs
    [wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
    # This file is auto-generated by libsemanage
    # Do not edit directly.

    [wmsodbc]> sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/latest/logs(/.*)?'
    [wmsodbc]> ls -lZd logs
    drwxr-xr-x. tomcat tomcat system_u:object_r:var_log_t:s0 logs
    [wmsodbc]> sudo restorecon -v -R logs/
    restorecon reset /WMSData1/tomcat/apache-tomcat-8.5.37/logs context system_u:object_r:var_log_t:s0->system_u:object_r:default_t:s0
    [wmsodbc]>


    So what am I doing wrong? Obviously, chcon is temporary. But it works, unlike semanage, in changing file context. And then we clearly see restorecon changing it back to "default_t". So a second question would be why is it changing it back to "default_t"?



    Could it be the fact that "latest" is a softlink and semanage does not like softlink in the full path? I think I MIGHT have gotten it to work by going directly to directory "latest" points to and using THAT absolute path, but waiting to see if it fixes my issues. If someone could point me to proof that this is the issue, that would be great.










    share|improve this question


























      2












      2








      2








      On my centos 7 machine, I have the following information:



      [wmsodbc]> pwd
      /WMSData1/tomcat/latest
      [wmsodbc]> ls -lrt /WMSData1/tomcat/latest
      lrwxrwxrwx. 1 tomcat tomcat 37 May 2 19:26 /WMSData1/tomcat/latest -> /WMSData1/tomcat/apache-tomcat-8.5.37
      [wmsodbc]> ls -ltd logs
      drwxr-xr-x. 2 tomcat tomcat 4096 May 10 13:05 logs
      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
      [wmsodbc]>


      I have tried many times to set the file context to var_log_t, but it does not take. See attempts below. All steps taken from various websites online. First of all, attempt 1:



      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
      [wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
      # This file is auto-generated by libsemanage
      # Do not edit directly.

      /WMSData1/tomcat/latest/logs(/.*)? system_u:object_r:var_log_t:s0
      [wmsodbc]> sudo restorecon -vR logs/
      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
      [wmsodbc]>


      And attempt 2, using a slightly different method:



      [wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
      # This file is auto-generated by libsemanage
      # Do not edit directly.

      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
      [wmsodbc]> sudo chcon system_u:object_r:var_log_t:s0 /WMSData1/tomcat/latest/logs/
      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:var_log_t:s0 logs
      [wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
      # This file is auto-generated by libsemanage
      # Do not edit directly.

      [wmsodbc]> sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/latest/logs(/.*)?'
      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:var_log_t:s0 logs
      [wmsodbc]> sudo restorecon -v -R logs/
      restorecon reset /WMSData1/tomcat/apache-tomcat-8.5.37/logs context system_u:object_r:var_log_t:s0->system_u:object_r:default_t:s0
      [wmsodbc]>


      So what am I doing wrong? Obviously, chcon is temporary. But it works, unlike semanage, in changing file context. And then we clearly see restorecon changing it back to "default_t". So a second question would be why is it changing it back to "default_t"?



      Could it be the fact that "latest" is a softlink and semanage does not like softlink in the full path? I think I MIGHT have gotten it to work by going directly to directory "latest" points to and using THAT absolute path, but waiting to see if it fixes my issues. If someone could point me to proof that this is the issue, that would be great.










      share|improve this question
















      On my centos 7 machine, I have the following information:



      [wmsodbc]> pwd
      /WMSData1/tomcat/latest
      [wmsodbc]> ls -lrt /WMSData1/tomcat/latest
      lrwxrwxrwx. 1 tomcat tomcat 37 May 2 19:26 /WMSData1/tomcat/latest -> /WMSData1/tomcat/apache-tomcat-8.5.37
      [wmsodbc]> ls -ltd logs
      drwxr-xr-x. 2 tomcat tomcat 4096 May 10 13:05 logs
      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
      [wmsodbc]>


      I have tried many times to set the file context to var_log_t, but it does not take. See attempts below. All steps taken from various websites online. First of all, attempt 1:



      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
      [wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
      # This file is auto-generated by libsemanage
      # Do not edit directly.

      /WMSData1/tomcat/latest/logs(/.*)? system_u:object_r:var_log_t:s0
      [wmsodbc]> sudo restorecon -vR logs/
      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
      [wmsodbc]>


      And attempt 2, using a slightly different method:



      [wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
      # This file is auto-generated by libsemanage
      # Do not edit directly.

      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:default_t:s0 logs
      [wmsodbc]> sudo chcon system_u:object_r:var_log_t:s0 /WMSData1/tomcat/latest/logs/
      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:var_log_t:s0 logs
      [wmsodbc]> more /etc/selinux/targeted/contexts/files/file_contexts.local
      # This file is auto-generated by libsemanage
      # Do not edit directly.

      [wmsodbc]> sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/latest/logs(/.*)?'
      [wmsodbc]> ls -lZd logs
      drwxr-xr-x. tomcat tomcat system_u:object_r:var_log_t:s0 logs
      [wmsodbc]> sudo restorecon -v -R logs/
      restorecon reset /WMSData1/tomcat/apache-tomcat-8.5.37/logs context system_u:object_r:var_log_t:s0->system_u:object_r:default_t:s0
      [wmsodbc]>


      So what am I doing wrong? Obviously, chcon is temporary. But it works, unlike semanage, in changing file context. And then we clearly see restorecon changing it back to "default_t". So a second question would be why is it changing it back to "default_t"?



      Could it be the fact that "latest" is a softlink and semanage does not like softlink in the full path? I think I MIGHT have gotten it to work by going directly to directory "latest" points to and using THAT absolute path, but waiting to see if it fixes my issues. If someone could point me to proof that this is the issue, that would be great.







      centos7 selinux






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 3 hours ago







      user3329922

















      asked 3 hours ago









      user3329922user3329922

      1587




      1587




















          2 Answers
          2






          active

          oldest

          votes


















          3















          Could it be the fact that "latest" is a softlink and semanage does not like softlink in the full path?




          Yes, thats exactly why.



          From man 3 matchpathcon



          NAME
          matchpathcon, matchpathcon_index - get the default SELinux security context for the specified path from the file contexts configuration
          ...
          DESCRIPTION
          ...
          matchpathcon() matches the specified pathname, after transformation via realpath(3)...


          Just to clarify, realpath(3) expands all symbolic links in the path to attempt to define the absolute canonical path to the file.



          You could probably specify the PCRE as /WMSData1/tomcat/[^/]+/logs(/.*)? instead to avoid the problem in a manner that means you dont have to continually add new file contexts.






          share|improve this answer























          • Ok, that worked great: Ran sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/[^/]+/logs(/.*)?', then sudo restorecon -R -vv */logs/

            – user3329922
            1 hour ago











          • Detailed high quality answer, thank you. (Especially for the details in man 3 matchpathcon, didn't see that before.)

            – hargut
            1 hour ago



















          0














          Path mismatch? Symlink?



          /WMSData1/tomcat/latest/logs



          vs.



          /WMSData1/tomcat/apache-tomcat-8.5.37/logs



          This:



          /WMSData1/tomcat/latest/logs(/.*)?



          is a regular expression, that does not match the apache-tomcat-8.5.37 path.



          For more details on regex see: https://regex101.com/






          share|improve this answer























          • Yep, and as per @Mathew lfe, because the lower level stuff dereferences link before doing it, it cannot find a match to apache path. Thanks.

            – user3329922
            1 hour ago











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "2"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f966759%2fsemanage-not-changing-file-context%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3















          Could it be the fact that "latest" is a softlink and semanage does not like softlink in the full path?




          Yes, thats exactly why.



          From man 3 matchpathcon



          NAME
          matchpathcon, matchpathcon_index - get the default SELinux security context for the specified path from the file contexts configuration
          ...
          DESCRIPTION
          ...
          matchpathcon() matches the specified pathname, after transformation via realpath(3)...


          Just to clarify, realpath(3) expands all symbolic links in the path to attempt to define the absolute canonical path to the file.



          You could probably specify the PCRE as /WMSData1/tomcat/[^/]+/logs(/.*)? instead to avoid the problem in a manner that means you dont have to continually add new file contexts.






          share|improve this answer























          • Ok, that worked great: Ran sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/[^/]+/logs(/.*)?', then sudo restorecon -R -vv */logs/

            – user3329922
            1 hour ago











          • Detailed high quality answer, thank you. (Especially for the details in man 3 matchpathcon, didn't see that before.)

            – hargut
            1 hour ago
















          3















          Could it be the fact that "latest" is a softlink and semanage does not like softlink in the full path?




          Yes, thats exactly why.



          From man 3 matchpathcon



          NAME
          matchpathcon, matchpathcon_index - get the default SELinux security context for the specified path from the file contexts configuration
          ...
          DESCRIPTION
          ...
          matchpathcon() matches the specified pathname, after transformation via realpath(3)...


          Just to clarify, realpath(3) expands all symbolic links in the path to attempt to define the absolute canonical path to the file.



          You could probably specify the PCRE as /WMSData1/tomcat/[^/]+/logs(/.*)? instead to avoid the problem in a manner that means you dont have to continually add new file contexts.






          share|improve this answer























          • Ok, that worked great: Ran sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/[^/]+/logs(/.*)?', then sudo restorecon -R -vv */logs/

            – user3329922
            1 hour ago











          • Detailed high quality answer, thank you. (Especially for the details in man 3 matchpathcon, didn't see that before.)

            – hargut
            1 hour ago














          3












          3








          3








          Could it be the fact that "latest" is a softlink and semanage does not like softlink in the full path?




          Yes, thats exactly why.



          From man 3 matchpathcon



          NAME
          matchpathcon, matchpathcon_index - get the default SELinux security context for the specified path from the file contexts configuration
          ...
          DESCRIPTION
          ...
          matchpathcon() matches the specified pathname, after transformation via realpath(3)...


          Just to clarify, realpath(3) expands all symbolic links in the path to attempt to define the absolute canonical path to the file.



          You could probably specify the PCRE as /WMSData1/tomcat/[^/]+/logs(/.*)? instead to avoid the problem in a manner that means you dont have to continually add new file contexts.






          share|improve this answer














          Could it be the fact that "latest" is a softlink and semanage does not like softlink in the full path?




          Yes, thats exactly why.



          From man 3 matchpathcon



          NAME
          matchpathcon, matchpathcon_index - get the default SELinux security context for the specified path from the file contexts configuration
          ...
          DESCRIPTION
          ...
          matchpathcon() matches the specified pathname, after transformation via realpath(3)...


          Just to clarify, realpath(3) expands all symbolic links in the path to attempt to define the absolute canonical path to the file.



          You could probably specify the PCRE as /WMSData1/tomcat/[^/]+/logs(/.*)? instead to avoid the problem in a manner that means you dont have to continually add new file contexts.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 hours ago









          Matthew IfeMatthew Ife

          20.6k24663




          20.6k24663












          • Ok, that worked great: Ran sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/[^/]+/logs(/.*)?', then sudo restorecon -R -vv */logs/

            – user3329922
            1 hour ago











          • Detailed high quality answer, thank you. (Especially for the details in man 3 matchpathcon, didn't see that before.)

            – hargut
            1 hour ago


















          • Ok, that worked great: Ran sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/[^/]+/logs(/.*)?', then sudo restorecon -R -vv */logs/

            – user3329922
            1 hour ago











          • Detailed high quality answer, thank you. (Especially for the details in man 3 matchpathcon, didn't see that before.)

            – hargut
            1 hour ago

















          Ok, that worked great: Ran sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/[^/]+/logs(/.*)?', then sudo restorecon -R -vv */logs/

          – user3329922
          1 hour ago





          Ok, that worked great: Ran sudo semanage fcontext -a -t var_log_t '/WMSData1/tomcat/[^/]+/logs(/.*)?', then sudo restorecon -R -vv */logs/

          – user3329922
          1 hour ago













          Detailed high quality answer, thank you. (Especially for the details in man 3 matchpathcon, didn't see that before.)

          – hargut
          1 hour ago






          Detailed high quality answer, thank you. (Especially for the details in man 3 matchpathcon, didn't see that before.)

          – hargut
          1 hour ago














          0














          Path mismatch? Symlink?



          /WMSData1/tomcat/latest/logs



          vs.



          /WMSData1/tomcat/apache-tomcat-8.5.37/logs



          This:



          /WMSData1/tomcat/latest/logs(/.*)?



          is a regular expression, that does not match the apache-tomcat-8.5.37 path.



          For more details on regex see: https://regex101.com/






          share|improve this answer























          • Yep, and as per @Mathew lfe, because the lower level stuff dereferences link before doing it, it cannot find a match to apache path. Thanks.

            – user3329922
            1 hour ago















          0














          Path mismatch? Symlink?



          /WMSData1/tomcat/latest/logs



          vs.



          /WMSData1/tomcat/apache-tomcat-8.5.37/logs



          This:



          /WMSData1/tomcat/latest/logs(/.*)?



          is a regular expression, that does not match the apache-tomcat-8.5.37 path.



          For more details on regex see: https://regex101.com/






          share|improve this answer























          • Yep, and as per @Mathew lfe, because the lower level stuff dereferences link before doing it, it cannot find a match to apache path. Thanks.

            – user3329922
            1 hour ago













          0












          0








          0







          Path mismatch? Symlink?



          /WMSData1/tomcat/latest/logs



          vs.



          /WMSData1/tomcat/apache-tomcat-8.5.37/logs



          This:



          /WMSData1/tomcat/latest/logs(/.*)?



          is a regular expression, that does not match the apache-tomcat-8.5.37 path.



          For more details on regex see: https://regex101.com/






          share|improve this answer













          Path mismatch? Symlink?



          /WMSData1/tomcat/latest/logs



          vs.



          /WMSData1/tomcat/apache-tomcat-8.5.37/logs



          This:



          /WMSData1/tomcat/latest/logs(/.*)?



          is a regular expression, that does not match the apache-tomcat-8.5.37 path.



          For more details on regex see: https://regex101.com/







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 hours ago









          harguthargut

          1,76717




          1,76717












          • Yep, and as per @Mathew lfe, because the lower level stuff dereferences link before doing it, it cannot find a match to apache path. Thanks.

            – user3329922
            1 hour ago

















          • Yep, and as per @Mathew lfe, because the lower level stuff dereferences link before doing it, it cannot find a match to apache path. Thanks.

            – user3329922
            1 hour ago
















          Yep, and as per @Mathew lfe, because the lower level stuff dereferences link before doing it, it cannot find a match to apache path. Thanks.

          – user3329922
          1 hour ago





          Yep, and as per @Mathew lfe, because the lower level stuff dereferences link before doing it, it cannot find a match to apache path. Thanks.

          – user3329922
          1 hour ago

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f966759%2fsemanage-not-changing-file-context%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Siegen Nawigatsjuun

          Log på Navigationsmenu

          Log på Navigationsmenu