POV-Ray

The Persistence of Vision Raytracer (POV-Ray).

This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.

Attached to Project: POV-Ray
Opened by Grimbert Jérôme - 2010-07-04
Last edited by Chris Cason - 2010-12-15

FS#154 - Installation on linux (unix ?) in $HOME/.povray/3.7 set wrong owner

Installation script (from sources) when run with a classical “sudo make install” would create povray.ini & povray.conf in $HOME/.povray/3.7 (so far so fine) with the owner as root and the permission to readonly for the real user.

Same goes for the owner of the 3.7 directories tree : .povray & .povray/3.7 are created with root owner, despite being in $HOME of the performing user.

Please fix ?

Closed by  Chris Cason
Wednesday, 15 December 2010, 02:53 GMT
Reason for closing:  Fixed
Grimbert Jérôme commented on Tuesday, 10 August 2010, 07:34 GMT

Suggestion of correction: in the top level Makefile (or Makefile.in/Makefile.am), the section which create the user directories & files might be amended.

Current code (beta 38)

	@echo "Creating user directories..."; \
	for p in $(povuser) $(povconfuser) ; do \
	  $(mkdir_p) $$p && printf "%s\n" "$$p" "`cat $(povinstall)`" > $(povinstall); \
	done
	@echo "Copying user configuration and INI files..."; \
	for f in povray.conf povray.ini ; do \
	  if test -f $(povconfuser)/$$f; then \
	    echo "Creating backup of $(povconfuser)/$$f"; \
	    mv -f $(povconfuser)/$$f $(povconfuser)/$$f.bak; \
	  fi; \
	done; \
	$(INSTALL_DATA) $(top_srcdir)/povray.conf $(povconfuser)/povray.conf && echo "$(povconfuser)/povray.conf" >> $(povinstall); \
	$(INSTALL_DATA) $(top_builddir)/povray.ini $(povconfuser)/povray.ini && echo "$(povconfuser)/povray.ini" >> $(povinstall)

with additional properties in the start (reminder: povuser = $(HOME)/.povray )

owner= `stat -c %u ${HOME}`
group= `stat -c %g ${HOME}`
	@echo "Creating user directories..."; \
        $owner = 
	for p in $(povuser) $(povconfuser) ; do \
	  $(mkdir_p) $$p && chown $(owner) $$p && chgrp $(group) $$p && printf "%s\n" "$$p" "`cat $(povinstall)`" > $(povinstall); \
	done
	@echo "Copying user configuration and INI files..."; \
	for f in povray.conf povray.ini ; do \
	  if test -f $(povconfuser)/$$f; then \
	    echo "Creating backup of $(povconfuser)/$$f"; \
	    mv -f $(povconfuser)/$$f $(povconfuser)/$$f.bak; \
	  fi; \
	done; \
	$(INSTALL_DATA) $(top_srcdir)/povray.conf $(povconfuser)/povray.conf && chown $(owner) $(povconfuser)/povray.conf && chgrp $(owner) $(povconfuser)/povray.conf &&echo "$(povconfuser)/povray.conf" >> $(povinstall); \
	$(INSTALL_DATA) $(top_builddir)/povray.ini $(povconfuser)/povray.ini && chown $(owner) $(povconfuser)/povray.ini && chgrp $(group) $(povconfuser)/povray.ini && echo "$(povconfuser)/povray.ini" >> $(povinstall)

Of course, protection & detection for chgrp & chown can also be done (like mkdir_p) if needed.

The issue with "sudo make install" is that the $USER is changed to 'root', but the $HOME is not changed. (and within a sudo-ed shell, any 'id' is root, that's a bit the purpose of sudo)

I have no problem that files get installed in the $HOME of the installing user (it's even a good thing), just that the ownership (user & group) should be correct.

Grimbert Jérôme commented on Saturday, 25 September 2010, 19:52 GMT

Still present with beta 39 (from sources via perforce)

Grimbert Jérôme commented on Tuesday, 26 October 2010, 21:45 GMT

change #5166 (#5162) has been done.

Grimbert Jérôme commented on Thursday, 09 December 2010, 13:47 GMT

Checked as fixed with beta 40.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing