Will not open files on USB drive

Bug #1912260 reported by Dave Burgess
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
Undecided
Unassigned

Bug Description

Will not open files on mounted USB drive. I am able to open files on same drive in other applications. Have tried both from within Pinta using "Open file" (mounted USB does not show in dialogue box) and from file manager "open with Pinta":

System.UnauthorizedAccessException: Access to the path "/media/dave/Grouch/E-drive/Pictures/2013/Capital F-20130824-00086.jpg" is denied.
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <d13c8b563008422a8c5aaec0a74089cc>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <d13c8b563008422a8c5aaec0a74089cc>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in <d13c8b563008422a8c5aaec0a74089cc>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
  at Pinta.Core.GdkPixbufFormat.Import (System.String fileName, Gtk.Window parent) [0x00001] in <2384e42676f8477c8d7fef8885667d1f>:0
  at Pinta.Core.WorkspaceManager.OpenFile (System.String file, Gtk.Window parent) [0x0003d] in <2384e42676f8477c8d7fef8885667d1f>:0

Revision history for this message
grofaty (grofaty) wrote :

It looks to me permission problem. Can you open image with some other image program?

1. What is your operating system? Windows, Linux, macOS? If it is Linux (looks like), please write distribution name and version.
2. What is your Pinta version. Please check the Help | About.

Revision history for this message
James Carroll (james-carroll) wrote :

This sounds like a probnlem caused by Snap's sandboxing. Snaps are confined and can't access anything out of $HOME by default, to get USB drives to work for the Pinta Snap you need to give it permission specifically, try this in the terminal

sudo snap connect pinta-james-carroll:removable-media :removable-media

In Pinta 1.8 this step shouldn't be necessary

Revision history for this message
grofaty (grofaty) wrote :

I tested this problem using Pinta 1.7 from snap package.
In Pinta when I select /media folder I get nice error message:

Could not read the contents of media
Error opening directory '/media': Permission denied

If crash appears like in original reporter post, it may not be Pinta/snap package.

It would still be nice if some more info is provided by original bug reporter like:
- operating system name and version
- Pinta version from Help | About
- How Pinta was installed (if operating system is Linux)? PPA, snap, flatpack etc
- Provide exact step-by-step instructions how to reproduce a problem

BTW, if using Pinta/snap James instructions do work and access to USB is allowed.
I can't set this bug report to Confirmed, because I can't reproduce the error message.

Revision history for this message
Dave Burgess (burgessdave00) wrote : Re: [Bug 1912260] Re: Will not open files on USB drive
Download full text (3.4 KiB)

Hi there and thanks for your work on this.

I've since reformatted the USB drive to FAT32 from NTFS and have no problem
opening files on it now. Regarding the original problem:
- operating system name and version: *Ubuntu 18.04*
- Pinta version from Help | About - *not sure but was installed from Ubuntu
Software app, probably Jan 15, 2021. Have reinstalled since.*
- How Pinta was installed (if operating system is Linux)? PPA, snap,
flatpack etc - *via Ubuntu Software app.*
- Provide exact step-by-step instructions how to reproduce a problem. *Open
Pinta - select: File/Open/ (any .jpg on USB hard drive formatted NTFS).*

That's all I can think of for now.

Best regards

Dave.

On Sun, Feb 21, 2021 at 11:25 AM grofaty <email address hidden> wrote:

> I tested this problem using Pinta 1.7 from snap package.
> In Pinta when I select /media folder I get nice error message:
>
> Could not read the contents of media
> Error opening directory '/media': Permission denied
>
> If crash appears like in original reporter post, it may not be
> Pinta/snap package.
>
> It would still be nice if some more info is provided by original bug
> reporter like:
> - operating system name and version
> - Pinta version from Help | About
> - How Pinta was installed (if operating system is Linux)? PPA, snap,
> flatpack etc
> - Provide exact step-by-step instructions how to reproduce a problem
>
> BTW, if using Pinta/snap James instructions do work and access to USB is
> allowed.
> I can't set this bug report to Confirmed, because I can't reproduce the
> error message.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1912260
>
> Title:
> Will not open files on USB drive
>
> Status in Pinta:
> New
>
> Bug description:
> Will not open files on mounted USB drive. I am able to open files on
> same drive in other applications. Have tried both from within Pinta
> using "Open file" (mounted USB does not show in dialogue box) and from
> file manager "open with Pinta":
>
> System.UnauthorizedAccessException: Access to the path
> "/media/dave/Grouch/E-drive/Pictures/2013/Capital F-20130824-00086.jpg" is
> denied.
> at System.IO.FileStream..ctor (System.String path, System.IO.FileMode
> mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32
> bufferSize, System.Boolean anonymous, System.IO.FileOptions options)
> [0x0019e] in <d13c8b563008422a8c5aaec0a74089cc>:0
> at System.IO.FileStream..ctor (System.String path, System.IO.FileMode
> mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32
> bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in
> <d13c8b563008422a8c5aaec0a74089cc>:0
> at System.IO.FileStream..ctor (System.String path, System.IO.FileMode
> mode, System.IO.FileAccess access) [0x00000] in
> <d13c8b563008422a8c5aaec0a74089cc>:0
> at (wrapper remoting-invoke-with-check)
> System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
> at Pinta.Core.GdkPixbufFormat.Import (System.String fileName,
> Gtk.Window parent) [0x00001] in <2384e42676f8477c8d7fef8885667d1f>:0
> at Pinta....

Read more...

Revision history for this message
Cameron White (cameronwhite91) wrote :

From comment #2, this should be fixed in the next release of Pinta

Changed in pinta:
milestone: none → 2.0
status: New → Fix Committed
Changed in pinta:
status: Fix Committed → Fix Released
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.