Musescore 3 shows permission denied while opening a file, but not Musescore 2
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
Hard to say, maybe the mount has a permission problem and you have MuseScore 2 & 3 installed as different users.
In reply to Hard to say, maybe the mount… 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 Nope, there is only one user… by silverrope
There's you and root... using sudo to start or install MuseScore?
What are the permissions of those files and their directories? What does
ls -ld /media/internal
say? Does it work afterchmod 777 /media/internal
?In reply to There's you and root… 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 I didn't use sudo to start… by silverrope
mount options? file system type?
In reply to mount options? file system… 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 Simple mount, no options:… by silverrope
or a problem with NTFS support in Linux?
In reply to or a problem with NTFS… 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 I tried it with ext4 anyway… by silverrope
so owner/group is "user user" in /home/user, was "user root" on /media/internal (ntfs), but is "users users" on /media/temp (ext4) now??
In reply to so owner/group is "user user… by Jojo-Schmitz
Please do not be pedantic. The owner name is really my username which I do not want to reveal. Whether it is user or users (which is just me replacing the my real name) should not be an issue raised in software development.
In reply to Please do not be pedantic… by silverrope
"user" and "users" are different IDs, the fact that you made those up was unknown to me
In reply to Please do not be pedantic… 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 Nope, there is only one user… 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 MuseScore uses standard file… by Marc Sabatella
those execute permissions on NTFS might be bogus
In reply to MuseScore uses standard file… 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 Here are the permissions for… 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 Here are the permissions for… by silverrope
MuseScore 3 didn't exist in Apr 15 2018
In reply to MuseScore uses standard file… 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 There may be a good reason… by silverrope
More evidence of a permission problem indeed.
In reply to MuseScore uses standard file… 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 For Musescore 3 executable,… 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.
In reply to For Musescore 3 executable,… by silverrope
I know nothing of how snaps work, could be there is an issue with how they create virtual filesystems. Better to use the supported versions of MuseScore, which are either the AppImage (preferred usually) or the version provided by your Linux distribution.
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:
In reply to I can confirm that this… 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.
In reply to what is that musescore… by Jojo-Schmitz
musescore.mscore
is the binary you get when you runsudo snap install musescore
, as advertised on the official download page at https://musescore.org/en/downloadIf that is unsupported, that's fine, but you should note that on the download page for future users, please.
In reply to musescore.mscore is the… by dolfmus
It is unsupported by the MuseScore team. The link provided for convenience, like those for multiple other Linux distros.
But yes, the download page should be more clear on that
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 Well, i have an update: I… 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 Hi - I don't see any… 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. ;-) )
In reply to Hi Marc, When I submitted my… 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.
In reply to I can confirm, this problem… by tilusnet
.
In reply to I can confirm, this problem… by tilusnet
See #333193: Unable to open files from a USB stick in snap build.
(Not @tilusnet)
In reply to I can confirm, this problem… by tilusnet
To be clear: AppImage isn't a "workaround", it's the supported way of running MuseScore on Linux.