Re: [Vala] GIO run as root Fail



2017-08-18 12:21 GMT-05:00 Al Thomas <astavale yahoo co uk>:
On Friday, August 18, 2017, 4:39:33 PM GMT+1, Edwin De La Cruz
<edwinspire gmail com> wrote:

var directory = File.new_for_uri("ftp://ftp.gnu.org/";);

The program works fine as both a normal user and root if the file://
protocol is used, e.g.

var directory = File.new_for_uri("file:///home/al/");

GVFS is used for each protocol and the following commands work
fine on the command line:

gvfs-mount ftp://anonymous ftp gnu org/
gvfs-ls ftp://anonymous ftp gnu org/
gvfs-mount --unmount ftp://anonymous ftp gnu org/

What I did find was that ftp.gnu.org does require the anonymous user.
So I tried:
var directory = File.new_for_uri("ftp://anonymous ftp gnu org/");

That made no difference.

It is the line:

var enumerator = directory.enumerate_children
(FileAttribute.STANDARD_NAME, 0);

that is returning the "Operation not supported" message.

So I'm not sure what the problem is. I did note that as a normal user
the program returns the message "The specified location is not mounted"
Only as root is it saying the operation is not supported.

I hope you figure it out,

Al

It was definitely not possible to run as root. I had to run as a user
and it works as expected.
Thanks to everyone for your replies.


Mis proyectos de software libre en:
Github - edwinspire


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]