SUSE / ses-upgrade-helper

GNU General Public License v2.0
2 stars 2 forks source link

DNM: upgrade-to-ses3: follow links when chowning /var/lib/ceph #66

Closed ghost closed 8 years ago

ghost commented 8 years ago

When doing a recursive chown, -L ensures symlinks are followed and the directories which are point to, have their permissions properly modified.

Fixes: SUSE/ses-upgrade-helper#65

Signed-off-by: Karol Mroz kmroz@suse.de

ghost commented 8 years ago

But of course the -L kills the default behaviour of also chowning the link itself. Thus the link stays as root:root, while the contents of the directory pointed to by the link is set to ceph:ceph :/

ghost commented 8 years ago

I think this only impacts setups that use partitions as mounts points for OSDs, not entires disks (as is the case for our default installs).

smithfarm commented 8 years ago

A mount point is always a directory in a filesystem.

Typically, the OSD filesystem resides in a partition on the OSD disk. (You wouldn't have an OSD filesystem on a disk without a partition table...)

OSDs can use directories within an existing filesystem, but I don't think we support that.

Can you describe a scenario in which Ceph would create a symlink in /var/lib/ceph pointing to a file or directory outside of /var/lib/ceph? Sounds kinda funky.

ghost commented 8 years ago

@smithfarm Poorly phrased on my part (I was thinking a directory mounted on a disk not used exclusively by the OSD). And you're right, this should impact all cases actually. I wonder why I'm just hitting this now. I think doing 2 passes across /var/lib/ceph is safest. First pass with -R (which by default does not traverse symlinks, but sets the proper ownership of them), second with -RL (which will traverse the symlink and set ownership on the directory and contents pointed to). Thoughts?

smithfarm commented 8 years ago

I don't think it's a good idea.

ghost commented 8 years ago

Yea, I'm also not for it. Closing. Thanks!