cant change permission of a configure file

hey guys i downloaded a tar file or mplayer and it was a source file since it contains configure make and make install files in ***
well
i extracted the file and when i tried to configure it through terminal it gave error that permission denied… then i wrote su and gave root password and tired to ./configure but it said no such directory found …after this failure i logged in as root account and right clicked on the configure file to change permission i ticked read and write permission for all users i mean for group and for users and pressed ok when i right clicked on file to check whether changes were made but it did not gave permission to other users tell me why i cant change permission of the file

On 11/27/2012 12:26 PM, yasirassassin wrote:
>
> hey guys i downloaded a tar file or mplayer

why did you do that rather than open YaST Software Management and just
install mplayer??

perhaps before doing more damage you should read the openSUSE way of
“Managing and Updating Software” here
http://doc.opensuse.org/documentation/html/openSUSE/opensuse-startup/part.reference.software.html

that will be a good read for you, however i can only guess that maybe
you have not followed the information in our new-to-openSUSE guide lines
here: http://tinyurl.com/32g4nmp

and therefore missed the pointer to the “best” way to install mplayer
and a whole host of other needed multimedia items, just follow the guide
here: http://tinyurl.com/czx3jab

> i extracted the file and when i tried to configure it through terminal
> it gave error that permission denied…

how, and to where did you extract the source? i ask because if you
extracted the source file as root, then root owned all the contents of
the extraction…

and, if you extracted it to a directory owned by root then you (as a
user) wouldn’t be allowed to operate it…

> then i wrote su and gave root
> password and tired to ./configure but it said no such directory found

you must be careful that you are in the directory where the configure
file exists…that is, if you as a (say) NormalUser open a konsold,
x-term etc) you will be in the directory /home/NormalUser, so if you
unpacked the source to (say) /home/NormalUser/Desktop and then try to
run ./configure while still in /home/NormalUser it will fail because it
won’t go looking around to try to find the nearest configure!

> …after this failure i logged in as root account

i guess that means that you logged into KDE, GNOME, LXDE, Xfce or other
GUI as root…do NOT do that. instead, become root (by using “su -”)
but then navigate to the correct place before issuing the “./configure”
command

> and right clicked on
> the configure file to change permission i ticked read and write
> permission for all users i mean for group and for users and pressed ok

this is the wrong way to proceed…instead of changing the permissions
for a file, become the user needed to operate the file.

but of course, the trouble you had was because you unpacked the file as
root.

> when i right clicked on file to check whether changes were made but it
> did not gave permission to other users tell me why i cant change
> permission of the file

stop trying to do everything the hard way, instead:

-use YaST or zypper to install software

-and, if there is an easy way to set up all multimedia, use it (so, you
ask: How do i find the easy ways? read the provided documentation, or
ask here: How should i install mplayer? and someone would say: see
http://tinyurl.com/czx3jab)

-if you must compile from source do it the correct way:
–unpack as user, into a user owned spot (it is just temporary anyway)
–open terminal, nav to correct place and run “./configure” as user
–if all went well, run “make” as user
–if you want all users on the system to be able to use the new
application, become root “su -” and then run “make install”
–if you only want yourself, as the one user to operate the new sofware
then run “make install” as user (running “make install” as root is the
usual way)

lots to learn here–patience needed…good luck…


dd http://tinyurl.com/DD-Caveat

On 2012-11-27 12:26, yasirassassin wrote:
>
> hey guys i downloaded a tar file or mplayer and it was a source file
> since it contains configure make and make install files in ***
> well
> i extracted the file and when i tried to configure it through terminal
> it gave error that permission denied…

If you don’t know why, then don’t do it. Seriously.
Instead install mplayer from packman.

If you insist on doing it, then read a good unix/linux book first.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

hey dear am really sorry but i didnt understand the difference

extracting the source file as root
and

extracting it to a directory owned by root
!

does directory owened by root means that only root user has permission to write files to that directory ??
and how do i extract source file as root ?? do you mean if i would open my terminal write su give my root pass and navigate to that tar file directory and then extract it using command tar <package name .tar.gz> ??

more over you said that

you must be careful that you are in the directory where the configure
file exists…that is, if you as a (say) NormalUser open a konsold,
x-term etc) you will be in the directory /home/NormalUser, so if you
unpacked the source to (say) /home/NormalUser/Desktop and then try to
run ./configure while still in /home/NormalUser it will fail because it
won’t go looking around to try to find the nearest configure

i want to say something here is that i extracted the file as a normal user because root user would have been in condition if i would open my terminal write su give my root pass and navigate to that tar file directory and then extract it using command.
but i didnt do that i was in file manager and i went simply into directory where i had that tar file and i right clicked and extracted it there
moreoever you said that if i extracted file to /home/NormalUser/Desktop directory and if i try to ./configure while am in /home/NormalUser directory then difinately i will fail because configure file is not in that directory its in /home/NormalUser/Desktop/xyz folder (here xyz is the folder which i extracted )

am i right about this point that why i wont be able to ./configure the file ???

> hey dear am really sorry but i didnt understand the difference
>>
>> extracting the source file as root
>> and
>>
>> extracting it to a directory owned by root !

[first, there are probably lots of exceptions to what i think i know, so]

  1. if root extracts a tar then all the contents extracted are owned by
    root…in that case then a user’s configure command would not execute
    the root owned file

  2. if a user extracts a tar into a directory owned by root with
    permissions that allows a non-root user to write into the directory but
    does not allow a non-root user to execute anything in that directory,
    then the configure command from a user would not execute the file due to
    insufficient permissions…

> does directory owened by root means that only root user has permission
> to write files to that directory ??

usually that is the case, but it depends on the permissions of each
directory…they do not all have to be the same…

the administrator (be that you or someone else) can decide that some or
all users can write to a directory owned by root…depending on the
administrators needs…in fact, a user might be granted the ability to
write to a directory but not read from it, or not execute anything in it…

> and how do i extract source file as root ?? do you mean if i would open
> my terminal write su give my root pass and navigate to that tar file
> directory and then extract it using command tar <package name .tar.gz>
> ??

yes, that is one way… (more below)

>
> i want to say something here is that i extracted the file as a normal
> user because root user would have been in condition if i would open my
> terminal write su give my root pass and navigate to that tar file
> directory and then extract it using command.
> but i didnt do that i was in file manager and i went simply into
> directory where i had that tar file and i right clicked and extracted it
> there

but but, there is another way to extract a tar file as root, and that
would be by using GUI tool with root powers like “File Manager - Super
User Mode” or YaST, or maybe several others…anything GUI which asks
for the root password when launched has root powers…

which includes the entire desktop environment (KDE, GNOME, etc etc)
and everything launched from it when one starts it up from the log in
screen by specifying root as the user and giving the root password…

so, if you logged into KDE, etc as root, and then opened a file manager,
that file manager is root, and if it is used to extract a tar file then
all of the contents extracted will be owned by root…and, a user
cannot afterwards execute the configure file…

i hope that makes sense…

do you know about the ls command? it can show you the ownership and
permissions of each directory and file…

maybe you are at the point where you could benefit from some of the
internet’s millions of words about the linux file system and its
permissions…

maybe have a look though some of these:
http://tldp.org/LDP/intro-linux/html/chap_03.html
http://rute.2038bug.com/
http://www.linux-tutorial.info/index.php
http://www.linfo.org/
http://tldp.org/guides.html

> moreoever you said that if i extracted file to /home/NormalUser/Desktop
> directory and if i try to ./configure while am in /home/NormalUser
> directory then difinately i will fail because configure file is not in
> that directory its in /home/NormalUser/Desktop/xyz folder (here xyz is
> the folder which i extracted )
>
> am i right about this point that why i wont be able to ./configure the
> file ???

i am not sure what you wrote/ask, but if you ask:

if the execuitable file named configure is in
/home/NormalUser/Desktop/xyz and i am in a terminal in
/home/NormalUser/Desktop and type ./configure will it execute? the
answer is no it will not…

you MUST be in the same directory as the configure file to execute it
with ./configure…

however you could execute it from anywhere (including the moon, if
networked in and) if you typed this full path to the target file:

/home/NormalUser/Desktop/xyz/configure


dd http://tinyurl.com/DD-Caveat

On 11/28/2012 12:24 PM, dd pecked at the keyboard and wrote:
>> hey dear am really sorry but i didnt understand the difference
>>>
>>> extracting the source file as root
>>> and
>>>
>>> extracting it to a directory owned by root !
>
> [first, there are probably lots of exceptions to what i think i know, so]
>
> 1) if root extracts a tar then all the contents extracted are owned by
> root

Not so, all files will be restored with the UID/GID that was in place
when the tar file was created.

On 11/28/2012 09:13 PM, Ken Schneider wrote:
> all files will be restored with the UID/GID that was in place
> when the tar file was created.

ok…thanks for the correction…


dd