vorbiscomment does not honor read-only file permission

Bug #708406 reported by Richard Griswold
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
vorbis-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: vorbis-tools

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu

Description: Ubuntu 10.10
Release: 10.10

2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center

vorbis-tools:
  Installed: 1.4.0-1ubuntu1
  Candidate: 1.4.0-1ubuntu1
  Version table:
 *** 1.4.0-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status

3) What you expected to happen

If I run vorbiscomment with the write (-w) or append (-a) flags on a read-only file, I expect to get an error message. After all, the point of making a file read-only is to prevent processes from writing to it.

4) What happened instead

If I run vorbiscomment with the write (-w) or append (-a) flags on a read-only file, the command writes the new comments to the file. This can be seen by running vorbiscomment again to show the new comments and by checking the old and new file sizes. For example:

$ dd if=/dev/zero bs=32 count=100000 2> /dev/null | oggenc -Q -r -o test.ogg -
$ chmod 400 test.ogg
$ ls -l test.ogg
-r-------- 1 richard richard 5666 2011-01-26 16:51 test.ogg
$ vorbiscomment test.ogg
$ vorbiscomment -w test.ogg -t "artist=Me" -t "title=The Sound of Silence"
$ ls -l test.ogg
-r-------- 1 richard richard 5709 2011-01-26 16:51 test.ogg
$ vorbiscomment test.ogg
artist=Me
title=The Sound of Silence
$ vorbiscomment -a test.ogg -t "year=2011"
$ ls -l test.ogg
-r-------- 1 richard richard 5722 2011-01-26 16:51 test.ogg
$ vorbiscomment test.ogg
artist=Me
title=The Sound of Silence
year=2011

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: vorbis-tools 1.4.0-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-25.43-generic 2.6.35.10
Uname: Linux 2.6.35-25-generic x86_64
Architecture: amd64
Date: Wed Jan 26 16:22:51 2011
ProcEnviron:
 LC_TIME=en_DK.utf8
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
SourcePackage: vorbis-tools

Revision history for this message
Richard Griswold (richgriswold) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vorbis-tools (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.