Bug 444482 - Check does not play well with Read-Only root filesystems
Check does not play well with Read-Only root filesystems
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Simo Sorce
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2008-04-28 12:18 EDT by Dolhay Denes
Modified: 2009-07-14 14:21 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-14 14:21:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dolhay Denes 2008-04-28 12:18:39 EDT
Description of problem:

in the SMB init script, there is a check: [ -w /etc/samba/smb.conf ] || exit 4
which is not a good check if the fs is in RO state.

I advise to replace this check with the id -u orded
Comment 1 Simo Sorce 2008-04-28 13:09:41 EDT
If the filesystem is in read-only state samba will just fail as it needs to
write in .tdb files to work at all.

Not sure I understand the advice, in any case I think this is intentional and
not a bug, so closing.
Comment 2 Dolhay Denes 2008-04-28 13:28:03 EDT
I am useing Fedora for a server, and the / fs is RO. All other fs -es like var
and tmp are read write. But since the configuration file is in a read only
filesystem, the given test fails, and kills the init script with error code 4.
If I remove this test, Samba works correctly. So since this test is intended to
be a test for that, the caller user is root or not, I suggest to change the
given test to
[ `id -u` = 0 ] || exit 4
So root users wil not be allowed to run the script, and it will return a correct
value if the / fs is RO.
Comment 3 Simo Sorce 2008-04-28 14:29:21 EDT
it's probably easier to remove the check at that point, smbd need to listen on
privileged ports and read root-only oned files, so it will fail anyway if run as
non-root ...

If I change it with a check on the /var/lib/samba and /var/cache/samba
directories to be writable, would this be better ?
Comment 4 Dolhay Denes 2008-04-28 15:38:31 EDT
/var/lib/samba would be the best I think

Thank you for the assistance!

I have a few improvements to fedora to work better with ro / file system
init scripts, etc. Shall I post them (in  a different report)?
Comment 5 Simo Sorce 2008-04-28 17:05:32 EDT
I am renaming this one, feel free to attch them here if they are samba related
Comment 6 Dolhay Denes 2008-04-28 17:38:36 EDT
no, they are not. This issue can be closed now if you think that way too.
Comment 7 Bug Zapper 2008-05-14 06:19:14 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Comment 8 Bug Zapper 2009-06-09 20:29:57 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 9 Bug Zapper 2009-07-14 14:21:52 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.