Re: What to do instead of using rc.local?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2019-07-13 at 08:10 +0800, Ed Greshko wrote:
> In the event anyone is interested.  The short answer is....
> 
> Unless a file or directory has a "FILE transition rule" defined in
> the selinux policy it will inherit the context of the directory where
> it resides.  The file .fetchmailrc has no such transition rule
> associated with it.

Hmm, I thought one of the prior posts said that .fetchmailrc needed a
special context (it's certainly different from the home user's other
contexts).  A further problem was that running fetchmail created a
.fetchmail.pid lock file that apparently needed special context, too.

$ ll -Z .fetchmail*
-rw-------. tim tim unconfined_u:object_r:user_home_t:s0 .fetchmail.pid
-rw-------. tim tim unconfined_u:object_r:fetchmail_home_t:s0 .fetchmailrc

This (above) worked when called by root in the command line, the user
in the command line, or crontab, but not from rc.local.

Inheriting *my* home directory context wouldn't get it working in the
case I was trying (from rc.local):

$ ll -Zd /home/tim
drwx------. tim tim unconfined_u:object_r:user_home_dir_t:s0 /home/tim

Since I was launching fetchmail with "su" in front of it, it ought to
be running as me.  Which, normally, wouldn't have suffered all the
problems I was having with it.

I even tried changing the command further, to use my environment:

su --login tim -c "/usr/bin/fetchmail -d 900"

Which also fails, but with even less useful information in the logs
(zero mention of fetchmail).

I even tried making a /etc/fetchmail script, containing my commands,
and launching that script from rc.local, instead.  Still didn't do me
any good.

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux