Accessing Removable-Media

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Accessing Removable-Media

David Carter

Greetings All,

 

Please forgive me if this is not the appropriate forum for this question.

 

I have recently replaced the Chrome OS in my Acer Chromebook 14 with ubuntu version 18.04.3. After the ubuntu install, I used the ubuntu software application to install Octave version 5.1.0 via the Snapstore. Octave installed and runs without a problem.

 

The issue I am having is my inability to access the /media directory from Octave. I can access the directory from ubuntu and ultimately get to a USB flash drive without difficulty, but whenever I cd to /media in Octave, I get a “Permission Denied” message.

 

I am a ubuntu novice, but it appears to me that the snap that installed Octave does not include the “removable-media” interface, and thus is preventing me from accessing the /media directory. The Octave snap interfaces are defined in /snap/octave/10/meta/snap.yaml which is mounted as “Read Only” and try as I might, I am unable to edit the file. I have tried all the usual remedies, sudo, chmod, chown, mount, etc.

 

Any guidance or insight in how to edit snap.yaml, or another solution on how I can access my USB flash drive from inside Octave would be greatly appreciated.

 

Thanks much for the help.

 

David…

 



Reply | Threaded
Open this post in threaded view
|

Re: Accessing Removable-Media

Octave - General mailing list


On 27/12/2019 23:44, David Carter wrote:

Greetings All,

 

Please forgive me if this is not the appropriate forum for this question.

 

I have recently replaced the Chrome OS in my Acer Chromebook 14 with ubuntu version 18.04.3. After the ubuntu install, I used the ubuntu software application to install Octave version 5.1.0 via the Snapstore. Octave installed and runs without a problem.

 

The issue I am having is my inability to access the /media directory from Octave. I can access the directory from ubuntu and ultimately get to a USB flash drive without difficulty, but whenever I cd to /media in Octave, I get a “Permission Denied” message.

 

I am a ubuntu novice, but it appears to me that the snap that installed Octave does not include the “removable-media” interface, and thus is preventing me from accessing the /media directory. The Octave snap interfaces are defined in /snap/octave/10/meta/snap.yaml which is mounted as “Read Only” and try as I might, I am unable to edit the file. I have tried all the usual remedies, sudo, chmod, chown, mount, etc.

 

Any guidance or insight in how to edit snap.yaml, or another solution on how I can access my USB flash drive from inside Octave would be greatly appreciated.

 

Thanks much for the help.

 

David…

 



    

Why do you need to do 'cd /media' ?


If you want to access removable media, you need to perform operations on /media/the/rest/of/the/path/to/media.

On my box an example of real path when removable media is present is  /media/sergei/9016-4EF8 .


--Sergei.



Reply | Threaded
Open this post in threaded view
|

Re: Accessing Removable-Media

Mike Miller-4
In reply to this post by David Carter
On Fri, Dec 27, 2019 at 14:44:59 -0700, David Carter wrote:

> The issue I am having is my inability to access the /media directory
> from Octave. I can access the directory from ubuntu and ultimately get
> to a USB flash drive without difficulty, but whenever I cd to /media
> in Octave, I get a “Permission Denied” message.
>
> I am a ubuntu novice, but it appears to me that the snap that
> installed Octave does not include the “removable-media” interface, and
> thus is preventing me from accessing the /media directory. The Octave
> snap interfaces are defined in /snap/octave/10/meta/snap.yaml which is
> mounted as “Read Only” and try as I might, I am unable to edit the
> file. I have tried all the usual remedies, sudo, chmod, chown, mount,
> etc.
>
> Any guidance or insight in how to edit snap.yaml, or another solution
> on how I can access my USB flash drive from inside Octave would be
> greatly appreciated.
I suspect you're probably right about the removable-media interface. It
works for me on Debian without that interface connected, but that's
possibly a feature of the way confinement is implemented. Many of the
restrictions are only effective on Ubuntu.

If you think it would be useful to have the removable-media interface
added to Octave, please open an issue on the octave-snap project
(https://github.com/octave-snap/octave-snap/issues). It would be best if
you are able to demonstrate that it doesn't work as is, and does work if
you run in devmode.

--
mike



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Accessing Removable-Media

David Carter

Hi Mike,

 

Thanks much for the response. Now allow me do display my ignorance and ask, how do I run Octave in devmode?

 

David…

 

From: [hidden email]
Sent: Saturday, December 28, 2019 12:12 AM
To: [hidden email]
Cc: [hidden email]
Subject: Re: Accessing Removable-Media

 

On Fri, Dec 27, 2019 at 14:44:59 -0700, David Carter wrote:

> The issue I am having is my inability to access the /media directory

> from Octave. I can access the directory from ubuntu and ultimately get

> to a USB flash drive without difficulty, but whenever I cd to /media

> in Octave, I get a “Permission Denied” message.

>

> I am a ubuntu novice, but it appears to me that the snap that

> installed Octave does not include the “removable-media” interface, and

> thus is preventing me from accessing the /media directory. The Octave

> snap interfaces are defined in /snap/octave/10/meta/snap.yaml which is

> mounted as “Read Only” and try as I might, I am unable to edit the

> file. I have tried all the usual remedies, sudo, chmod, chown, mount,

> etc.

>

> Any guidance or insight in how to edit snap.yaml, or another solution

> on how I can access my USB flash drive from inside Octave would be

> greatly appreciated.

 

I suspect you're probably right about the removable-media interface. It

works for me on Debian without that interface connected, but that's

possibly a feature of the way confinement is implemented. Many of the

restrictions are only effective on Ubuntu.

 

If you think it would be useful to have the removable-media interface

added to Octave, please open an issue on the octave-snap project

(https://github.com/octave-snap/octave-snap/issues). It would be best if

you are able to demonstrate that it doesn't work as is, and does work if

you run in devmode.

 

--

mike

 



Reply | Threaded
Open this post in threaded view
|

Re: Accessing Removable-Media

siko1056
On 12/29/19 6:06 AM, David Carter wrote:
> Hi Mike,
>
>  
> Thanks much for the response. Now allow me do display my ignorance and
> ask, how do I run Octave in devmode?
>  
>
> David…
>


I did not try it myself, but I think you need to install Octave like this

   snap install octave --beta --devmode

See [1,2] for details.

HTH,
Kai

[1] https://snapcraft.io/docs/snap-confinement
[2] https://manpages.ubuntu.com/manpages/bionic/man1/snap.1.html


Reply | Threaded
Open this post in threaded view
|

Re: Accessing Removable-Media

Mike Miller-4
On Sun, Dec 29, 2019 at 12:20:12 +0900, Kai Torben Ohlhus wrote:
> On 12/29/19 6:06 AM, David Carter wrote:
> > Thanks much for the response. Now allow me do display my ignorance and
> > ask, how do I run Octave in devmode?
>
> I did not try it myself, but I think you need to install Octave like this
>
>    snap install octave --beta --devmode

Yeah, that's exactly what I had in mind.

--
mike



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Accessing Removable-Media

David Carter
Mike and Kai,

Thank you so much for the help! After installing octave in devmode, I was able to access the flash drive without a problem. Do either of you believe this is worthy of a bug report at this time, or should I wait to see the behavior when version 5.1 is released as “stable”?

Happy New Year!

David...

> On Dec 30, 2019, at 5:14 PM, Mike Miller <[hidden email]> wrote:
>
> On Sun, Dec 29, 2019 at 12:20:12 +0900, Kai Torben Ohlhus wrote:
>>> On 12/29/19 6:06 AM, David Carter wrote:
>>> Thanks much for the response. Now allow me do display my ignorance and
>>> ask, how do I run Octave in devmode?
>>
>> I did not try it myself, but I think you need to install Octave like this
>>
>>   snap install octave --beta --devmode
>
> Yeah, that's exactly what I had in mind.
>
> --
> mike



Reply | Threaded
Open this post in threaded view
|

Re: Accessing Removable-Media

Mike Miller-4
On Tue, Dec 31, 2019 at 19:03:37 -0700, David Carter wrote:
> Thank you so much for the help! After installing octave in devmode, I
> was able to access the flash drive without a problem. Do either of you
> believe this is worthy of a bug report at this time, or should I wait
> to see the behavior when version 5.1 is released as “stable”?

Yes, as I think I recommended before, if you can show that removeable
media is not accessible, but does work with --devmode, please do file a
bug report.

--
mike



signature.asc (849 bytes) Download Attachment