Permission denied | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Permission denied

UNIX for Dummies Questions & Answers


Tags
unix and linux

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-22-2014
chinababy chinababy is offline
Registered User
 
Join Date: Mar 2014
Last Activity: 25 March 2014, 6:38 PM EDT
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Permission denied

when i run echo "User” > /dev/tty5 why do i get permission denied?
Sponsored Links
    #2  
Old 03-22-2014
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 23 October 2014, 11:38 AM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 4,286
Thanks: 45
Thanked 824 Times in 651 Posts
Quote:
Originally Posted by chinababy View Post
when i run echo "User” > /dev/tty5 why do i get permission denied?
Because you are not allowed to do that. ;-))

Seriously: check the permissions of file "/dev/tty5" with the command


Code:
ls -l /dev/tty5

and have a look. Every file (device files are files too) carry a "r" (read), a "w" (write) and a "x" (execute) privilege for the owner, the owners group and every other user. See "man ls" for more details about this. Here is one of my systems:


Code:
# ls -l /dev/tty5
crw------- 1 root root 4, 5 Mar  4 15:51 /dev/tty5

As you can see the user "root" has "rw", his group (accidentally also named "root") has no rights at all and everybody else has no rights either.

I hope this helps.

bakunin
Sponsored Links
    #3  
Old 03-22-2014
MadeInGermany MadeInGermany is offline Forum Advisor  
Registered User
 
Join Date: May 2012
Last Activity: 22 October 2014, 5:51 PM EDT
Location: Simplicity
Posts: 1,974
Thanks: 127
Thanked 578 Times in 524 Posts

Code:
man write

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Permission denied paramshamnani Linux 1 10-17-2013 06:12 PM
Permission denied lhareigh890 Shell Programming and Scripting 4 06-27-2011 10:08 AM
Why do I keep getting .:Permission denied? bbersani UNIX for Dummies Questions & Answers 12 12-04-2008 02:49 AM
Permission denied big123456 UNIX for Advanced & Expert Users 1 10-10-2007 07:17 AM
Permission Denied howeezy UNIX for Dummies Questions & Answers 0 09-14-2005 09:52 AM



All times are GMT -4. The time now is 01:50 PM.