GNOME Bugzilla – Bug 331295
gnomevfssink doesn't respect umask when creating files
Last modified: 2006-02-19 14:36:11 UTC
If the app is going to force permissions on the resulting track files (rather than relying on umask) then it should be configurable. I happen to like my track files to be world readable, and currently they are not by default. If this is a Gnome thing instead of a sound-juicer thing, then ... where is the configuration? Other information:
Sound Juicer doesn't enforce a permissions, this must be the gnomevfssink. I confirmed with this gst-launch: $ umask 0000 $ touch /tmp/foo && ls -l /tmp/foo && rm -f /tmp/foo -rw-rw-rw- 1 ross ross 0 2006-02-15 17:15 /tmp/foo $ gst-launch-0.10 fakesrc num-buffers=1 ! gnomevfssink location=file:///tmp/fooSetting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 363000 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... FREEING pipeline ... $ ll /tmp/foo -rw-r----- 1 ross ross 0 2006-02-15 17:16 /tmp/foo
* ext/gnomevfs/gstgnomevfssink.c: (gst_gnome_vfs_sink_open_file): use 0666 mask when creating files so umask gets applied correctly. Fixes #331295. wim@wtay:~/gst/head/gstreamer$ umask 0022 wim@wtay:~/gst/head/gstreamer$ rm /tmp/foo* wim@wtay:~/gst/head/gstreamer$ gst-launch fakesrc num-buffers=1 ! gnomevfssink location=file:///tmp/foo.tmp Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 12138000 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... FREEING pipeline ... wim@wtay:~/gst/head/gstreamer$ ls -la /tmp/foo* -rw-r--r-- 1 wim wim 0 Feb 19 15:29 /tmp/foo.tmp wim@wtay:~/gst/head/gstreamer$ rm /tmp/foo* wim@wtay:~/gst/head/gstreamer$ umask 0000 wim@wtay:~/gst/head/gstreamer$ gst-launch fakesrc num-buffers=1 ! gnomevfssink location=file:///tmp/foo.tmp Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 1441000 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... FREEING pipeline ... wim@wtay:~/gst/head/gstreamer$ ls -la /tmp/foo* -rw-rw-rw- 1 wim wim 0 Feb 19 15:29 /tmp/foo.tmp wim@wtay:~/gst/head/gstreamer$