Musescore 3 shows permission denied while opening a file, but not Musescore 2

• Jan 22, 2020 - 00:33

I got a strange problem. I have been using Musescore 3 on Windows 7 and 10 and I recently installed Ubuntu on my laptop. I have used Musescore 2 without any problems on Ubuntu, but Musescore 3 has a bug somewhere. While I can open a file in my home directory using Musescore 3, when I copy the file to another partition (mounted /dev/sda2 onto /media/internal), then the file does not open showing a permission problem:
Cannot read file /media/internal/temp.mscz:
Permission denied
However, the same file on the /media/internal partition will open with Musescore 2! Anyone has any idea why?


Comments

In reply to by Marc Sabatella

Nope, there is only one user on my laptop (me). I installed Musescore 3 first. The second partition, /dev/sda2, is mounted in the standard Linux way (mkdir /media/internal, mount /dev/sda2 /media/internal). I have two copies of temp.mscz, one in my home directory (/home/user) and one in /media/internal. The temp.mscz in the /home directory opens using Musescore 2 or 3, but the one in /media/internal only opens with Musescore 2. This sounds like a bug in Musescore 3 to me, at least in the Linux version. There are no problems in the Windows version using a second partition. Does anyone else has this problem?

In reply to by Jojo-Schmitz

I didn't use sudo to start or install Musescore, but I do have to use sudo to mount /dev/sda2. Here are the permissions:
-rw-rw-r-- 1 user user 4517 Jan 22 08:46 /home/user/temp2.mscz
-rw-rw-r-- 1 user user 4262 Jan 22 08:47 /home/user/temp3.mscz
-rwxrwxrwx 1 user root 4517 Jan 22 08:46 /media/internal/temp2.mscz
-rwxrwxrwx 1 user root 4262 Jan 22 08:47 /media/internal/temp3.mscz

temp2 is a Musescore 2 file, temp3 a Musescore 3.

/media/internal already has chmod 777 done.
drwxrwxrwx 1 user root 4096 Jan 22 08:48 /media/internal

I see that the group is set to root but that changes due to the mount. I originally made the directory with my ownership and group.

In reply to by Jojo-Schmitz

Simple mount, no options:
sudo mount /dev/sda2 /media/internal

File system type is NTFS. From sudo blkid:
/dev/sda2: UUID="1234" TYPE="ntfs" PTTYPE="dos" PARTUUID="0052-02"

Also it is rather mysterious that the temp2.mscz file on /media/internal will open with Musescore2 with no problem. Musescore3 refuses. Again, this seems indicate a bug in Musescore3 (at least the Linux version).

In reply to by Jojo-Schmitz

I tried it with ext4 anyway. Same problem. In any case, the file system type cannot explain why Musescore 2 works, but Musescore 3 doesn't.

Here is /dev/sda3 with an ext4 format:
/dev/sda3: UUID="84ad" TYPE="ext4" PARTUUID="00c0"
and the copied files:
-rw-rw-r-- 1 users users 4517 Jan 22 08:46 /media/temp/temp2.mscz
-rw-rw-r-- 1 users users 4262 Jan 22 08:47 /media/temp/temp3.mscz
I get the same permission error using Musescore3.

In reply to by silverrope

No is trying to be pedantic. We're just looking for clues to help you solve the problem. There is clearly some sort of configuration / permissions problem on your system, as we have thousands upon thousands of Linux users and no one else has reported an issue like this. So we're just throwing out ideas based on the information you are able to provide.

In reply to by silverrope

MuseScore uses standard file open system calls, nothing fancy, there is pretty much no way there could be a bug in MuseScore itself that causes it to not work with some partitions. It pretty much has to be a file system configuration / permissions issue. You say there is only one user, but obviously that's not true, there is also root. What are the permissions on the MuseScore executables themselves?

Not that this is a problem in itself, but the fact that the scores have execute permission and are owned by root does indicate something is fishy. As do the group settings, I think. So while that in itself isn't a problem it suggests there probably are other permissions issues that are causing this.

In reply to by Marc Sabatella

Here are the permissions for the executable:
-rwxr-xr-x 1 root root 24252992 Apr 15 2018 /usr/bin/mscore

It cannot be a configuration issue because I did not change the configuration for the Ubuntu18.04 install with the sole exception that I used gparted to create new partitions (one NTFS, one ext4). Gparted is the standard tool to create partitions.

Is this problem reproducible on another Ubuntu platform? Should this issue be considered a bug report or what? What should I do next?

In reply to by silverrope

That would appear to be the MuseScore 2 executable. What about MuseScore 3?

When I say "configuration", I mean everything from how you installed MuseScore 2 and MuseScore 3, how you created and mounted your partition, etc. So yes, you have changed quite a bit, and somewhere along the way, something went wrong. We need to retrace your steps a bit to understand when/where/how.

As I said, we have many thousands of Linux users - many if not most of whom are on Ubuntu. Your system seems to be the only one presenting a problem, and as I said, MuseScore is just using standard OS calls to open files etc. So all signs really do point to something wrong with the configuration / permissions on your particular system.

In reply to by Marc Sabatella

There may be a good reason no one has reported this. It is because Musescore 3 works on the installed partition. If it doesn't work on another partition, that is not a major problem as one can continue to make scores. I do need the scores on a separate partition because I would like to share it on the network. But that is another future issue...

Another thing I have noticed in the difference of Musescore 2 and 3 is that Musescore 2 can see the other partitions. I use File menu, then Open to load a score and I can go up the directory tree to /media and I can see the two partitions /media/internal and /media/temp and I can open the files that are on either NTFS or ext4. However when I use Musescore 3, when I get to the /media directory, I cannot see anything more (neither /media/internal nor /media/temp).

In reply to by Marc Sabatella

For Musescore 3 executable, I assume it is this one as snap file structure appears in Musescore 3:
-rwxr-xr-x 1 root root 29113328 Jan 10 19:33 /snap/musescore/96/usr/bin/mscore

Concerning what was done, I simply installed Ubuntu 18.04 (just vanilla). I then made a new partition and copied over my scores from my Windows system. I then installed Musescore 3 from the Ubuntu Software Centre. I found out that I could not open my old files on the partition but it could open on the /home/user directory. So I installed Musescore 2 (again from the Ubuntu Software Centre) and I found that it works on both. To make sure it was not related to my old files, I simply made a small test score, temp2.mscz using Musescore 2.

In reply to by silverrope

Oh and I can add one other point. I have many other files from Windows that I have transferred to the /media/internal partition (spreadsheets, documents, pdf, images, etc). All the files can be read by the appropriate apps (libreoffice, pdfviewer, etc.). Only Musescore 3 is giving a problem in reading its own mscz files.

I can confirm that this happens on LinuxMint 19.2, too, although I expect this to be the same on all Ubuntu variants. Any .mscz or .mscx file on a partition other than the linux partition (I have not tested with a separate home partition, as I have / and /home on the same partition) refuses to open, when using the Snap version of Musescore 3. It seems to be a restriction placed by AppArmor on the MuseScore Snap. Here are some error messages from the command line:

dolf@rsc27 /mnt/kappa/dolf/asdf/musescore $ musescore.mscore tune.mscz 

(mscore:14241): Gtk-WARNING **: 07:37:23.406: GTK+ module /snap/musescore/137/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libgail.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 07:37:23.406: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
Unable to load printer plugin "qtubuntu-print"
propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.70\" (uid=1000 pid=14241 comm=\"/snap/musescore/137/usr/bin/mscore tune.mscz \" label=\"snap.musescore.mscore (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1420 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.70\" (uid=1000 pid=14241 comm=\"/snap/musescore/137/usr/bin/mscore tune.mscz \" label=\"snap.musescore.mscore (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=1420 comm=\"/usr/sbin/NetworkManager --no-daemon \" label=\"unconfined\")"
"Object path cannot be empty"
^C
dolf@rsc27 /mnt/kappa/dolf/asdf/musescore $ ls -lha
total 3.0M
drwxrwxr-x  2 dolf dolf 4.0K Apr  8 22:33 .
drwxrwxrwx 12 dolf dolf 4.0K Apr  9 00:32 ..
-rwxr--r--  1 dolf dolf  12K Apr  8 22:32 tune.mscz
-rwxr--r--  1 dolf dolf 3.0M Apr  8 22:32 tune.wav

In reply to by dolfmus

What is that musescore.mscore ?
I don't see the error being related to permissions on opening those score files, but rather related to some network access. Could be telemetry?
Whatever, seems to be the snap version, and as such not supported by the MuseScore team. Use the AppImage or contact the snap maintainer.

Well, i have an update:

I found MuseScore 2.3.2, downloaded it and installed it under Ubuntu. When running MuseScore 2.3.2, I can access the files on a memory stick, or on another mounted device.

I hope this helps with solving it. ;-)

What I forgot with my previous post: many thanks to the ones who create and maintain MuseScore!

In reply to by barencor

Hi - I don't see any previous post from you. Can you describe your problem in more detail? I assume it's related to one of the issues discussed on this thread, and if so, as far as we know, it's unique to the Snap build, which we don't support ourselves - you'd have to report that to the Snap people. Meanwhile, the AppImage is the version we provide and support here on this site, and it works as expected on all systems as far as we know.

In reply to by Marc Sabatella

Hi Marc,

When I submitted my previous post I had a message that my post had to be approved by a moderator, because I was a new user. In the meanwhile I did not see my that post being published. With my second post I did not get that message, it was published right away.

More important, yesterday I spotted a solution:

When MuseScore shows the next error:
- "Cannot read file /media/MyFiles/So In Love.mscz" Permission denied"
open a terminal box and give the command:
- $ sudo snap connect musescore:removable-media

In my case it solved the problem.

I found this on the screen of the Ubuntu Software Catalog just before installing MuseScore 3. (I added a screen copy.)

Silverrope, does this solve it for you?

My previous post was to confirm the findings of Silverrope, i.e. that I could not open a file on a mounted device, like another partition, a memory card, or a USB stick. I don't recall the other details of the post. In the meanwhile I have had the same error when using other applications.

I also added a screen copy of the Debian Software Catalog. Debian installs MuseScore 2 and then I don't have to give the command "$ sudo snap connect musescore:removable-media".

PS: If I add two spaces at the start of a line for readability, then they are stripped out when I submit my post? (That's why the two dashes are there. ;-) )

Attachment Size
UbuntuMusescore3.png 132.46 KB
DebianMusescore2.png 96.99 KB

In reply to by barencor

I had this problem with a mounted ext4 networked file system - any program that wasn't snap related would work perfectly.
I can confirm that
$ sudo snap connect musescore:removable-media
works, and it seems to only be required once. Subsequently Musescore 3 snap works properly.

I can't find any documentation about this snap behaviour. The man page is opaque.
https://snapcraft.io/musescore
tells you about it, but doesn't explain it.
--quote--
Some interfaces need to be connected manually:
$ sudo snap connect musescore:cups-control
$ sudo snap connect musescore:network-manager
$ sudo snap connect musescore:alsa
$ sudo snap connect musescore:removable-media
But most of the application functionality works without them.
--endquote--

I can confirm, this problem does exist on my Musescore 3 installation too on Ubuntu 20.04.
And it's related to the snap installation mode.

In my case the only workaround was to use the AppImage distro.

Do you still have an unanswered question? Please log in first to post your question.