maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Permission problems after packaging (https://talk.maemo.org/showthread.php?t=71608)

darkmdmn 2011-03-29 12:06

Permission problems after packaging
 
Hey guys,

Some time ago I started developing a front-end GUI for the truecrypt commandline util. My program is working pretty well, so I started packaging it for Maemo5. I couldn't find a real good tutorial that worked, so I tried a bit myself. I now have a .deb package (packaged with MADDE), which installs without problems. When I try to run the application from the menu, it never starts.

I also tried to run it straight from the /usr/bin, than I get a permission denied error. I also chmodded the program to 755, and root had all the necessary permissions, yet the program doesn't start even with root permissions...

I really hope that someone can help me with this problem, because it is becoming pretty annoying xD Because i'm sort of new to the developing on a UNIX system, please let me know what files i need to post, because I have no idea what you guys need as additional info.

Thanks in advance,
Mark

AlMehdi 2011-03-29 12:55

Re: Permission problems after packaging
 
When you do "ls -l /path/to/file" you will see the files permissions.

It should look like this "rxwr-wr-w root root filename"

r = read
x= executable
w= write

Do you see the "x" on the file?

Edit: Oops.. missed that you chmodded to 755...

darkmdmn 2011-03-29 13:03

Re: Permission problems after packaging
 
Yeah, it returns something like:

-rwxr-xr-x 1 root root [date] [file]

AlMehdi 2011-03-29 13:28

Re: Permission problems after packaging
 
Did you use python? How are you trying to launch the program?

Did you use /usr/bin/python /path/to/file


(I am no expert either)

darkmdmn 2011-03-29 13:39

Re: Permission problems after packaging
 
I'm using QT Creator, so it's written in C++. I then packaged it with MADDE. Installed it with admin permissions through XTerm, then tried to launch it using the menu (which only highlights the icon, nothing more), when that didn't work, i tried to launch the program by executing /usr/bin/truecryptgui (the location where the program is installed) as root.

epitaph 2011-03-29 13:44

Re: Permission problems after packaging
 
Quote:

Originally Posted by darkmdmn (Post 977766)
I'm using QT Creator, so it's written in C++. I then packaged it with MADDE. Installed it with admin permissions through XTerm, then tried to launch it using the menu (which only highlights the icon, nothing more), when that didn't work, i tried to launch the program by executing /usr/bin/truecryptgui (the location where the program is installed) as root.

Recently I got this mail from the ovi-store:

Quote:

Thank you for submitting your content to Ovi Publish.

We are unable to process your content because it is not installing properly. Please fill in the following fields in the control file:

Section: Must be user/hidden.

Please rebuild your content with the above information filled in and resubmit.
The Section field in the control file must hold to there needs. I think their is a wiki about packaging and information about the section field.

I hope this helps!

darkmdmn 2011-03-29 14:09

Re: Permission problems after packaging
 
Quote:

Originally Posted by epitaph (Post 977770)
The Section field in the control file must hold to there needs. I think their is a wiki about packaging and information about the section field.

I hope this helps!

Didn't solve the problem. I have followed the wiki about packaging to create the package, however I think I have done somethink wrong. Just don't know where. I basically copy-pasted almost all of the codes and just edited some program-specific info.

nicolai 2011-03-29 14:16

Re: Permission problems after packaging
 
Quote:

Originally Posted by darkmdmn (Post 977766)
I'm using QT Creator, so it's written in C++. I then packaged it with MADDE. Installed it with admin permissions through XTerm, then tried to launch it using the menu (which only highlights the icon, nothing more), when that didn't work, i tried to launch the program by executing /usr/bin/truecryptgui (the location where the program is installed) as root.

And what is the error message?

And can you post the output of
dpkg -L <your_package>

I guess some files are missing in you .deb

darkmdmn 2011-03-29 14:29

Re: Permission problems after packaging
 
Quote:

Originally Posted by nicolai (Post 977791)
And what is the error message?

And can you post the output of
dpkg -L <your_package>

I guess some files are missing in you .deb

The error message is just 'permission denied, that's it'.

The output is:
/usr
/usr/bin
/usr/bin/truecryptgui
/usr/bin/truecryptgui/TruecryptGUI
/usr/share
/usr/share/applications
/usr/share/applications/hildon
/usr/share/applications/truecryptgui.desktop
/usr/share/doc
/usr/share/doc/truecryptgui
/usr/share/doc/truecryptgui/copyright

nicolai 2011-03-29 14:39

Re: Permission problems after packaging
 
and your command is
/usr/bin/truecryptgui/TruecryptGUI or
/usr/bin/truecryptgui ?

darkmdmn 2011-03-29 14:44

Re: Permission problems after packaging
 
The latter, so my command was not the correct one, I guess. But if I execute the first command I get:

/usr/sh: TruecryptGUI: not found

while ls of the directory gives:

TruecryptGUI

so the file is there...

Rob1n 2011-03-29 15:02

Re: Permission problems after packaging
 
Quote:

Originally Posted by darkmdmn (Post 977813)
The latter, so my command was not the correct one, I guess. But if I execute the first command I get:

/usr/sh: TruecryptGUI: not found

while ls of the directory gives:

TruecryptGUI

so the file is there...

It could be missing some required libraries - what does "ldd /usr/bin/truecryptgui/TruecryptGUI" give?

darkmdmn 2011-03-29 15:08

Re: Permission problems after packaging
 
Quote:

Originally Posted by Rob1n (Post 977828)
It could be missing some required libraries - what does "ldd /usr/bin/truecryptgui/TruecryptGUI" give?

libQtDBus.so.4 => /usr/lib/libQtDBus.so.4 (0x40025000)
libQtXml.so.4 => /usr/lib/libQtXml.so.4 (0x400c8000)
libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0x40120000)
libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x40c3e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40f37000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40f57000)
libm.so.6 => /lib/libm.so.6 (0x41038000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x410ae000)
libc.so.6 => /lib/libc.so.6 (0x410c0000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x411e5000)
librt.so.1 => /lib/librt.so.1 (0x411f1000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x41200000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x412dc000)
libz.so.1 => /usr/lib/libz.so.1 (0x41304000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4131c000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x4138f000)
libEGL.so => /usr/lib/libEGL.so (0x413d0000)
libSM.so.6 => /usr/lib/libSM.so.6 (0x413da000)
libICE.so.6 => /usr/lib/libICE.so.6 (0x413e9000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x41407000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x41417000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x41440000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x41457000)
libdl.so.2 => /lib/libdl.so.2 (0x41546000)
/lib/ld-linux.so.3 (0x40000000)
libIMGegl.so => /usr/lib/libIMGegl.so (0x41551000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x41565000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x4158b000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x41595000)
libsrv_um.so => /usr/lib/libsrv_um.so (0x415a1000)

Rob1n 2011-03-29 17:26

Re: Permission problems after packaging
 
That all looks okay anyway. The only other things I can think of to check are "file /usr/bin/truecryptgui/TruecryptGUI" to make sure that it's compiled for the correct architecture (though I think ldd would have complained about that anyway), and installing strace and running "strace /usr/bin/truecryptgui/TruecryptGUI" to check where it's actually getting the error.

darkmdmn 2011-03-29 18:23

Re: Permission problems after packaging
 
This is really annoying. Now i am in the correct directory, and when i do 'ls' it returns "TruecryptGUI", however, when i then try to run this program or try to get any information about it xterm says it doens't exist... How's that possible?

AlMehdi 2011-03-29 18:44

Re: Permission problems after packaging
 
Quote:

Originally Posted by darkmdmn (Post 977931)
This is really annoying. Now i am in the correct directory, and when i do 'ls' it returns "TruecryptGUI", however, when i then try to run this program or try to get any information about it xterm says it doens't exist... How's that possible?

Without permission the User might not be able to see it while Root may. The strange thing for you is that Root are not able to run it either. Have you tried to Chown it to User? Although that is most likely not it.

m750 2011-03-29 18:44

Re: Permission problems after packaging
 
Have You done some ftp transfer?

darkmdmn 2011-03-29 19:03

Re: Permission problems after packaging
 
I just tried chowning it to user, doensn't have any effect. I can access file permissions trough "ls -l TruecryptGUI", but when i try for example "file TruecryptGUI" it says that the file cannot be found.

@m750
I have transferred the .deb file via FTP. Other than that I haven't used FTP for anything.

m750 2011-03-29 19:03

Re: Permission problems after packaging
 
verify that the transfer is in BINARY mode

darkmdmn 2011-03-29 19:12

Re: Permission problems after packaging
 
Quote:

Originally Posted by m750 (Post 977951)
verify that the transfer is in BINARY mode

No effect... I have transferred the deb file through mass storage mode, but still the same effect. I seems like TruecryptGUI isn't recognized as a program or something...

edit:
I just checked if I can still run the program straight from QT without packaging, however, I get the error:

chmod: /usr/local/bin/truecryptgui: No such file or directory

Maybe it has something to do with the errors after packaging? Only I have no idea why it tries to chmod a directory /usr/local/bin, because that doesn't even exist...

m750 2011-03-29 19:33

Re: Permission problems after packaging
 
somtime you wrote: truecryptgui and sometime you wrote TruecryptGUI.
Mybe the trouble is with lower/uper case? (check al files)

darkmdmn 2011-03-29 20:10

Re: Permission problems after packaging
 
Yeah, I checked all files, but I don't really know where in the control file I need to put either 'truecryptgui' or 'TruecryptGUI', which one should be 'source' and 'package'?

Rob1n 2011-03-30 07:42

Re: Permission problems after packaging
 
Quote:

Originally Posted by darkmdmn (Post 977931)
This is really annoying. Now i am in the correct directory, and when i do 'ls' it returns "TruecryptGUI", however, when i then try to run this program or try to get any information about it xterm says it doens't exist... How's that possible?

That sounds like filesystem corruption to me. "ls" is just looking at the metadata (stored in the superblock) whereas anything else will need to read the actual file data.

darkmdmn 2011-03-30 08:04

Re: Permission problems after packaging
 
So is there some way to check for filesystem corruption? Is it likely that i created this myself by maybe deploying the app wrong?

epitaph 2011-03-30 08:13

Re: Permission problems after packaging
 
Quote:

Originally Posted by darkmdmn (Post 978290)
So is there some way to check for filesystem corruption? Is it likely that i created this myself by maybe deploying the app wrong?

fsck.ext3? If it is installed with HAM or FAM, then no.

darkmdmn 2011-03-30 08:16

Re: Permission problems after packaging
 
Quote:

Originally Posted by epitaph (Post 978297)
fsck.ext3? If it is installed with HAM or FAM, then no.

I have installed it with HAM, so that shouldn't give a problem than.

nicolai 2011-03-30 08:16

Re: Permission problems after packaging
 
Quote:

Originally Posted by darkmdmn (Post 977931)
This is really annoying. Now i am in the correct directory, and when i do 'ls' it returns "TruecryptGUI", however, when i then try to run this program or try to get any information about it xterm says it doens't exist... How's that possible?

ls -l <FULL_PATH_TO_YOUR_FILE>

it might be a symlink to a non existent file.

Nicolai

darkmdmn 2011-03-30 08:21

Re: Permission problems after packaging
 
Quote:

Originally Posted by nicolai (Post 978300)
ls -l <FULL_PATH_TO_YOUR_FILE>

it might be a symlink to a non existent file.

Nicolai

Same output as before:
-rwxr-xr-x 1 root root 64248 Feb 26 14:15 /usr/bin/truecryptgui/TruecryptGUI

What i find strange is the date above. I have uninstalled the app multiple times yesterday to try to get it working, yet the time is somewhere in February...

Rob1n 2011-03-30 08:59

Re: Permission problems after packaging
 
Quote:

Originally Posted by darkmdmn (Post 978290)
So is there some way to check for filesystem corruption?

Depends - if it's on the rootfs then no, there's no tools for testing/fixing ubifs filesystems. If it's actually under /opt (and symlinked) then you could use fsck to check the optfs (using, for example, backupmenu).

Quote:

Originally Posted by darkmdmn (Post 978290)
Is it likely that i created this myself by maybe deploying the app wrong?

No, deploying the app normally should not cause any corruption.

Actually, ldd worked earlier, which should have read the actual file, making filesystem corruption less likely to be an issue.

Can you try the following, so we can see exactly what does/doesn't work:
Code:

cd /usr/bin/truecryptgui
ls -l TruecryptGUI
ldd TruecryptGUI
file TruecryptGUI
./TruecryptGUI


Willem Liu 2011-03-30 09:04

Re: Permission problems after packaging
 
Hi

I'm not sure if I've ran into the same problems a while ago, but I've had something similar in the past.

http://talk.maemo.org/showthread.php?t=61921

darkmdmn 2011-03-30 09:22

Re: Permission problems after packaging
 
Quote:

Originally Posted by Rob1n (Post 978331)
Depends - if it's on the rootfs then no, there's no tools for testing/fixing ubifs filesystems. If it's actually under /opt (and symlinked) then you could use fsck to check the optfs (using, for example, backupmenu).


No, deploying the app normally should not cause any corruption.

Actually, ldd worked earlier, which should have read the actual file, making filesystem corruption less likely to be an issue.

Can you try the following, so we can see exactly what does/doesn't work:
Code:

cd /usr/bin/truecryptgui
ls -l TruecryptGUI
ldd TruecryptGUI
file TruecryptGUI
./TruecryptGUI


Okay, the ls and ldd work, and have the output as before. The file command doesn't work, and gives: "/bin/sh: file: not found", while ./TruecryptGUI starts the program :) So the program is able to start now, only I have to change the .desktop file to start working. Thanks! I'm gonna try to get the rest working. If I can't get it working i'll probably be back in this topic somewhere today.

Thanks for all the help!

darkmdmn 2011-03-30 13:30

Re: Permission problems after packaging
 
It's all working now. I have updated my version of QtSDK, then rebuilt the project and repackaged it. I probably have tried so much to make it work that in the process i have done some things that I shouldn't have.

Another quick question. If you have a Maemo native app, like email or calendar or something, and you dont have any mail or appointments there is a text in the center of the screen that's bold and bigger than normal text. Is there a special object for this text? Because my solution of recreating it as good as possibly doesn't work when someone changes a theme of course. I have already read through the UI specifications of Maemo, but it isn't mentioned as far as I know...


All times are GMT. The time now is 10:51.

vBulletin® Version 3.8.8