LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-10-2007, 03:47 AM   #1
tuffsach
LQ Newbie
 
Registered: Aug 2007
Posts: 3

Rep: Reputation: 0
Smile how to solve problems with permissions?


im getting a message like:
sachin@sachin-desktop:~/Desktop/rar$ cp unrar /usr/local/bin
cp: cannot create regular file `/usr/local/bin/unrar': Permission denied


i do not know wat this means and don't know to what to do abt it .if i could get some help?
 
Old 10-10-2007, 04:02 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
In Linux files have ownership and permissions: the ownership is "to whom the file belongs", permissions are "who can read, write or execute files". In this case you are trying to write a file in a directory which most likely belong to root. You may verify this by issuing
Code:
ls -ld /usr/local
drwxr-xr-x 33 root root 4096 Jan 10  2007 /usr/local/
So to move or copy a file to /usr/local/bin you have to be root or have root privileges (by the sudo command). For details you can see
Code:
man chown
man chmod
man sudo
 
Old 10-10-2007, 04:50 AM   #3
carl0ski
Member
 
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 12

Rep: Reputation: 30
Quote:
Originally Posted by tuffsach View Post
im getting a message like:
sachin@sachin-desktop:~/Desktop/rar$ cp unrar /usr/local/bin
cp: cannot create regular file `/usr/local/bin/unrar': Permission denied


i do not know wat this means and don't know to what to do abt it .if i could get some help?
Like windows only a high level user may modify files in system directories.

Windows most of c:\ and Windows folders are restricted.
only Documents and Settings\username is open to full access

Linux is the same
c:\ is replace by / (root)
Documents and Settings\username is replaced by /home/username
and the subfolders of /media /mnt are also usually user accessible.

I dont suggest granting your self full access to any bar the default folders. since this command is a very rare occurance.

to copy this file you should use a user with root permission

it you use Ubuntu or Debian
sudo cp unrar /usr/local/bin
Password: <your sachin password>

any other Distro
sachin@sachin-desktop:~/Desktop/rar$ su
Password: <your root password>
root@sachin-desktop:~/Desktop/rar#cp unrar /usr/local/bin
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't solve unmet dependencies problems dadof5 Linux - Software 1 12-08-2005 11:30 PM
proxy problems and how to solve it. Help please sarajevo Debian 2 10-07-2005 01:42 PM
How do I solve this Sound Problems on FC3? evalastin Linux - Newbie 4 01-17-2005 02:24 PM
Will Mandrake 10 solve my problems? HadesThunder Mandriva 8 05-12-2004 06:23 AM
mandrake 10 and a few 'must solve' problems Nay Linux - Newbie 12 04-13-2004 05:28 PM


All times are GMT -5. The time now is 02:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration