LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permissions change but dont??? (https://www.linuxquestions.org/questions/linux-newbie-8/permissions-change-but-dont-505084/)

paul123 11-26-2006 05:59 PM

Permissions change but dont???
 
Loaded xearth and checked permissions. They were read only to user and owned by root.

In terminal I changed the permissions to executable by user (chmod 755 xearth) then checked the change in terminal and everthing was fine.

-rwxr-xr-x 1 root root 183592 Jan 1 2006 xearth*

Still didnt execute.

In kde graphical directories when I right click on executable icon to get the permissions they still show read only for user???

Why?

Sorry im still learning! :study:

matthewg42 11-26-2006 06:25 PM

Could be that the file is on a device which is mounted with the noexec option. Open a terminal, cd to the directory where the file is, and type:
Code:

mount |fgrep $(df . |tail -n 1 |cut -d" " -f1)
Any hopefully you'll get one line of output. You'll see the mount options in brackets at the end of the line.

paul123 11-27-2006 02:10 AM

well this is what I get:

/dev/hdb11 on /usr type ext3 (rw)

device partion 11, the partion is /usr and the type of partition is ext3 ? (rw)? ????:study:

matthewg42 11-27-2006 08:24 AM

Quote:

Originally Posted by paul123
well this is what I get:

/dev/hdb11 on /usr type ext3 (rw)

device partion 11, the partion is /usr and the type of partition is ext3 ? (rw)? ????:study:

The first column is the device node (in the /dev directory). hdb means IDE channel 1, slave device. 11 is the partition number, but it's not 100% simple. 1-4 are the primary partitions. You're only allowed to have 4 of these (according to the IBM PC standard). However, there's a work-around this limitation. You can turn one of them into an "extended" partition, which is a container for "logical" partitions. These get numbers starting from 5 (so you can tell just from the number if it's a primary or a logical partition). So you may have something like this:
  • /dev/hdb1 is a primary partition with windows in it.
  • /dev/hdb2 is an extended partition filling the rest of the disk
  • /dev/hdb3 and /dev/hdb4 are primary partitions which don't exist
  • /dev/hdb5 is the first logical partition which resides "inside" /dev/hdb2
  • /dev/hdb6 is the second logical partition which resides "inside" /dev/hdb2
  • etc.
So it looks like you have at least 7 (!) logical partitions, the seventh being /dev/hdb11. By the way, hda is the primary master IDE drive, hdc is the secondary master, and hdd is the secondary slave.

The /usr part says where in Linux's virtual filesystem the partition is mounted. In your case, this is /usr. All the files and directories you see in /usr or a sub-directory of that are contained on the partition /dev/hdb11 unless some other device takes a sub-directory. For example, /usr/share/man and it's sub-directories might be on a different device.

ext3 is the partition type. Consider it a format. ext3 is commonly used on Linux systems. ReiserFS is another common one. FAT and NTFS are the windows partition types. HFS and HFS+ is used on the Mac. ISO9660 is the format for CDROMs etc etc. There are many in use for differrent purposes.

Lastly the (rw) means the partition is mounted read-write. If the noexec flag which I mentioned in my origial post were present, it would appear here. It is not, so my idea as to the cause of your problem is incorrect! I'll have another think.

paul123 11-27-2006 11:32 AM

/usr, /opt, /tmp, /, /boot, /var, /home



WindoZe on other drive, dual boot pc.

matthewg42 11-27-2006 12:05 PM

Wow, that's serious partitioning!

Umm, anyhow, back to the original question... Umm. Seems like there's more than one xearth if konqueror is showing different perms to ls. What is the output of this command:
Code:

locate /xearth |grep 'xearth$' |xargs ls -ld
One more thing - consider using xplanet - it's really nice.

paul123 11-27-2006 12:53 PM

Ok I will check when I get back to my Linux PC.

However just a bit of background to this problem. I run Mandriva 2007 and yesterday I went into configure your PC and looked for installable packages using the interface. I was looking for Xearth because I ran this years ago when I had a dabble with Linux.

I found the package and it wasnt already installed. At the same time I noticed there was an Xplanet and an Xfishtank that I could also install. So I installed all three packages from the interface. None of them run! All down as read only to user.

Am I being a complete newbie somehow?

Although im not at my machine to check, I seem to remember finding them after installation using kde find, xearth etc. plus it found some libs.

The directory im trying to execute them from is /usr/X11R6/bin.

This is where I changed the permission for xearth. The very same place where KDE graphically says I dont have permission! ???

In fact as I think about this im wondering if KDE is screwed?

Although ive only been up and running Linux two weeks Ive had a few problems with packages running and then not running. The other day I had Kscd running then the following day it said I didnt have permission, then I played a cd in Xine fine but when I went back to Kscd it ran ok!???? I also got a message kexec.io not found when trying to run kscd but then everything was fine. However I didnt seem to do anything to correct it!

Will let you know how it goes when I get home.

jonwatson 11-27-2006 01:44 PM

Is this possibly just a path problem? If you run
Code:

./xearth
(yes the ./ is important) in the directory that the xearth file resides in, what happens?

It's a long shot, but unlike Windows, Linux does not automatically include the current directory in the PATH statement. Therefore, if you're trying to run an executable in a directory that's not in the PATH, then you have to specify "this directory" by using ./

I think just a plain old . will work as well, but not sure and not in front of a Linux box at the moment.

matthewg42 11-27-2006 01:47 PM

I'd expect my package manager to set the correct permissions. I can't comment on Mandriva - never used it. It's is a mystery to me. Lets see what the output of that command turns up. You might need to execute updatedb (as root) before it turns up anything.

paul123 11-27-2006 02:31 PM

Well I will be home late this evening but your last post runs me slap bang into another issue.

I came across the updatedb command the other day and thought that sounds a neat way of locating packages.

so I su in konsol and did updatedb and it returned some thinking like cant run at this security level??

will give you the output later.

The only security level I can remember setting was at installation which defaulted to 'high' havent got a clue what that did or does or how I change or even whether I should????

:newbie:

jonwatson 11-27-2006 03:34 PM

Quote:

Originally Posted by matthewg42
I'd expect my package manager to set the correct permissions.

True, but I didn't see anything in his post that indicated he installed this app via a package manager. :twocents:

paul123 11-27-2006 05:20 PM

This is the output from the command $ ocate /xearth |grep 'xearth$' |xargs ls -ld

-rw-r--r-- 1 root root 516 Jan 1 2006 /usr/lib/menu/xearth
drwxr-xr-x 2 root root 1024 Nov 26 23:18 /usr/share/xearth
-rwxr-xr-x 1 root root 183592 Jan 1 2006 /usr/X11R6/bin/xearth


and the output if run as root was:

-rw-r--r-- 1 root root 516 Jan 1 2006 /usr/lib/menu/xearth
drwxr-xr-x 2 root root 1024 Nov 26 23:18 /usr/share/xearth
-rwxr-xr-x 1 root root 183592 Jan 1 2006 /usr/X11R6/bin/xearth




The result from # updatedb -u was:

slocate: fatal error: Security level must be 0 or 1.

ok now to ./xearth

in the actual xearth directory hangs the konsol so open another terminal and run ps -aux

and these are the lines from bottom of list:

root 5951 0.1 0.9 3668 1804 pts/2 S+ 23:17 0:00 ./xearth
darkness 5952 11.0 7.6 32432 14660 ? S 23:18 0:00 konsole [kdeini
darkness 5953 1.3 0.9 4124 1868 pts/1 Ss 23:18 0:00 /bin/bash
darkness 5988 0.0 0.5 2432 1000 pts/1 R+ 23:18 0:00 ps -aux

Now im going to get me books out for ps -aux.

matthewg42 11-27-2006 05:58 PM

Quote:

Originally Posted by paul123
This is the output from the command $ ocate /xearth |grep 'xearth$' |xargs ls -ld

-rw-r--r-- 1 root root 516 Jan 1 2006 /usr/lib/menu/xearth
drwxr-xr-x 2 root root 1024 Nov 26 23:18 /usr/share/xearth
-rwxr-xr-x 1 root root 183592 Jan 1 2006 /usr/X11R6/bin/xearth

The result from # updatedb -u was:
slocate: fatal error: Security level must be 0 or 1.

locate will only show files which were on the system the last time updatedb was run. I don't know why you get this error when you run updatedb. It's not possible to know if this was a pre-existing copy of the program, and you've installed a new one since then. This is a little problematic. OK, we can see if there is another xearth program with this command (please paste the result here):
Code:

( IFS=: ; for d in $PATH; do ls -l $d/bash 2>/dev/null; done )
Quote:

ok now to ./xearth

in the actual xearth directory hangs the konsol so open another terminal and run ps -aux

and these are the lines from bottom of list:

root 5951 0.1 0.9 3668 1804 pts/2 S+ 23:17 0:00 ./xearth
darkness 5952 11.0 7.6 32432 14660 ? S 23:18 0:00 konsole [kdeini
darkness 5953 1.3 0.9 4124 1868 pts/1 Ss 23:18 0:00 /bin/bash
darkness 5988 0.0 0.5 2432 1000 pts/1 R+ 23:18 0:00 ps -aux
Well, it looks like xearth is running there. As your non-root user, try executing xearth with the full path:
Code:

/usr/X11R6/bin/xearth
... and see if that helps.

Quote:

Now im going to get me books out for ps -aux.
You don't need a book. Linux comes with all the documentation you'll ever need. Just type:
Code:

man ps
If you're looking for an over-view of command line programs, try here.

paul123 11-28-2006 02:44 AM

/usr/X11R6/bin/xearth

hangs the konsol and no actvity from pc harddrive.

( IFS=: ; for d in $PATH; do ls -l $d/bash 2>/dev/null; done )

the output -rwxr-xr-x 1 root root 725160 Aug 24 16:05 /bin/bash*

:scratch:

I would just like to say I appreciate everybodies help. Although I think we must be on a loser here. :mad:

Im thinking about going back to the installation disk and trying to see if I can change security level so that I can run updatedb.

First I will try and find if the security level is configurable from terminal.:scratch:

Oh one other thing (and this happened with xine aswell) the xearth doesnt appear in my menus, with xine i found the executable and linked it to icon on desktop using full path and it was fine. Obviously that wont work with xearth because path doesnt execute.

Also the same evening that I installed xearth I installed xtraceroute and that did appear in th e menus and did run ok. So some apps work and some dont. :scratch:

Tinkster 11-28-2006 02:49 AM

What does
file /usr/X11R6/bin/xearth
have to say about the file?


Cheers,
Tink

paul123 11-28-2006 03:47 AM

file /usr/X11R6/bin/xearth


/usr/X11R6/bin/xearth: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped

matthewg42 11-28-2006 08:07 AM

Doh, I'm so so stupid. I meant to say
Code:

( IFS=: ; for d in $PATH; do ls -l $d/xearth 2>/dev/null; done )
I used bash in my test that I had the syntax correct because I don't have an xearth binary on my system, and then copy-pasted without changing it! For your system, we want to locate xearth files, not bash... sorry - my fault! Please can you execute the command with xearth in this post, and post the results. Thanks.

paul123 11-28-2006 09:47 AM

well its all gone tits! :rolleyes:

I embarked upon changing the security level....wish I hadnt:mad:

Mandriva say you can change security level via Draksec GUI but I failed to find it.

So I faked and installation to allow me to get at security level. Along the way I installed some extra software...wish I hadnt....should of just stuck to the issue in hand but I thought I could resolve anothe rissue at the same time....er wrong. Went right wrong! :scratch:

Anyway ive reinstalled and when I get back home tonite I will put xearth back on but check first that it isnt already there.

paul123 11-29-2006 03:12 AM

AAAAAaaaaaaaaaargh! the xearth saga continues!

Ive re-installed Mandriva 2007 from ISO DVD.

Checked my system for the xearth files. Double checked /usr/X11R6/bin, not there.

Ok into GUI software installation selection to install package...... er :scratch:

System doesnt find xearth anywhere on my pc or DVD .... :scratch:

No xtraceroute, no xfishtank, no xplanet, no xearth :scratch:

You know, I gave up smoking about 6 months ago and im actually thinking about getting a cigarette right now.:mad:

Excuse the pun but where on earth did I get it? I didnt download it for sure.

paul123 11-29-2006 06:21 AM

ok I gave up on finding it and ran urpmi xearth.

It loaded into directory with x permission for user. I tried to run but no go so what am I doing wrong? do I have to build it ./config xearth, make, make install ????

Im sure im being a complete twit somewhere :newbie:

ran this:

( IFS=: ; for d in $PATH; do ls -l $d/xearth 2>/dev/null; done )

got this

-rwxr-xr-x 1 root root 183592 Jan 1 2006 /usr/X11R6/bin//xearth*

ran this:

file /usr/X11R6/bin/xearth

got this:

/usr/X11R6/bin/xearth: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped

what enviroment do I have to be in? the KDE desktop runs in X dont it? Totally confused :scratch:

paul123 11-29-2006 06:23 AM

Oh and I ran this in kde command line and got knowhere aswell.

kdesu /usr/X11R6/bin/xearth

matthewg42 11-29-2006 07:07 AM

Yes, KDE runs on top of, or inside X. X is the basic graphical system. It provides the basic hardware abstraction which allows programs to draw objects, access the mouse and keyboard etc. It also provides a way to display programs on remote machines overe the network, but that's another story. On this basic graphics system, KDE an other desktop environments are built. KDE provides a standard set of widgets (file dialogs etc), window decoration, configuration, IPC system, etc etc for graphical programs. Somewhat smaller scope "window managers" also exist which don't do as much.

OK, enough boring stuff. To the problem. I think it's solved. I think xearth is running properly... except that KDE is not letting you see the root window. X provides this thing called the root window which is the background of the display. However, KDE paints over the root window. If you right-click on the background and select "Configure Desktop...", you can control what KDE puts there.

Click the "Advanced Options" button and you should get a dialog which allows you to hand over background painting to another program. Check the "Use the following program to draw the background" box. With luck, the Mandriva people will have set up the xearth package so that xearch appears in the list. If so, just select it. If not we have some more work to do, but I don't want to research it unless it's not in the list.

paul123 11-29-2006 12:42 PM

Ok I will try this when I get back home this evening.

To be honest doesnt it dont bother me whether I have xearth or not, the thing is when stuff is acting strange and I dont have the answers it bugs the sh*t out of me. lol.

matthewg42 11-29-2006 12:51 PM

Quote:

Originally Posted by paul123
Ok I will try this when I get back home this evening.

To be honest doesnt it dont bother me whether I have xearth or not, the thing is when stuff is acting strange and I dont have the answers it bugs the sh*t out of me. lol.

Absolutely my position. It's the crucial geeky difference - it's not that something works which matters, it's why and how.

paul123 11-29-2006 05:26 PM

So it was hiding behind the bloody wallpaper! lol.

I really cant believe that! 7 years ago I ran xearth on my pc and it never hid behind the wallpaper....now I will be forever wondering whats going on behind my desktop! lol

Thanks alot for the help, got to learn a few things whilst searching for planet earth!

And for some reason xine has appeared in a menu aswell tonite all I did was run it then it appeared in the menu.

Thanks again


All times are GMT -5. The time now is 12:34 PM.