LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-29-2010, 12:32 AM   #1
saqibsh
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Rep: Reputation: 0
/etc/csh.cshrc: Permission denied........................


please help me why it say permission denied, i am also in root and admin.


"[saqibsh@localhost ~]$ su
Password:
[root@localhost saqibsh]# '/etc/csh.cshrc'
bash: /etc/csh.cshrc: Permission denied
[root@localhost saqibsh]# "

 
Old 03-29-2010, 12:40 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,803

Rep: Reputation: 2540Reputation: 2540Reputation: 2540Reputation: 2540Reputation: 2540Reputation: 2540Reputation: 2540Reputation: 2540Reputation: 2540Reputation: 2540Reputation: 2540
rc files are not executable; they are sourced by a calling shell (in this case csh). Try an

ls -l /etc/csh.cshrc
 
Old 03-29-2010, 01:02 AM   #3
saqibsh
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
i want to modified this folder for email server configuration but cannot save changes or any file in etc.
/etc/dovecot.conf'
 
Old 03-29-2010, 02:31 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,502

Rep: Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617
If you ARE loged in as root ( or a normal user and using " su - " in the terminal you should be able to save ti to

is this a remote connection through ssh or you sitting in front of it . \

if sitting this WILL work ( most will have nano installed)
Code:
su - 
 the root pass when asked 
nano /etc/dovecot.conf
 
Old 03-29-2010, 02:38 AM   #5
saqibsh
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
see my first post, i already in root and also admin.
 
Old 03-29-2010, 02:49 AM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,040

Rep: Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409
Quote:
see my first post, i already in root and also admin.
It makes no difference that you are root. In your first post, it looks like you are trying to execute the file not edit it. That file should not be (or at least does not need to be) executable. As root you should be able to edit it with a text editor (as suggested by John VV).

Evo2.

Evo2.
 
Old 03-29-2010, 03:06 AM   #7
saqibsh
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
dear evo

this is just an example, any file etc cannot modified.
i go to administrator> root password
i enter password accept it but cannot modified any folder in etc.
 
Old 03-29-2010, 03:18 AM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,502

Rep: Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617
it would help if you informed us as to what distro you are using?
and What desktop in on it ,Gnome.KDE,e17,xfce,...)

if gnome then do this
open a terminal up
then type in " su -" ( without the"' )
type in your root password when asked
type in one of these
for the gui
gedit /etc/csh.cshrc
-- or for text only --
nano /etc/csh.cshrc
-- or --
vi /etc/csh.cshrc
 
Old 03-29-2010, 04:23 AM   #9
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,040

Rep: Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409
Quote:
Originally Posted by saqibsh View Post
this is just an example, any file etc cannot modified.
i go to administrator> root password
i enter password accept it but cannot modified any folder in etc.
Ok, so that we can better understand your problem please run the following commands in a terminal and cut and paste the output into the forum in [code] tags.

Code:
su -l
whoami
ls -l /etc/csh.cshrc
echo "# Test" >> /etc/csh.cshrc || mount && tail -1 /etc/csh.cshrc
Evo2.

Last edited by evo2; 03-29-2010 at 04:24 AM. Reason: typo
 
Old 03-29-2010, 04:54 AM   #10
saqibsh
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
[root@localhost saqibsh]# su -l
[root@localhost ~]# whoami
root
[root@localhost ~]# ls -l /etc/csh.cshrc
-rw-r--r-- 1 root root 1051 Mar 29 14:49 /etc/csh.cshrc
[root@localhost ~]#
[root@localhost ~]# echo "# Test" >> /etc/csh.cshrc || mount && tail -1 /etc/csh.cshrc
# Test
[root@localhost ~]#
 
Old 03-29-2010, 04:57 AM   #11
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,040

Rep: Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409Reputation: 1409
Quote:
Originally Posted by saqibsh View Post
[root@localhost saqibsh]# su -l
[root@localhost ~]# whoami
root
[root@localhost ~]# ls -l /etc/csh.cshrc
-rw-r--r-- 1 root root 1051 Mar 29 14:49 /etc/csh.cshrc
[root@localhost ~]#
[root@localhost ~]# echo "# Test" >> /etc/csh.cshrc || mount && tail -1 /etc/csh.cshrc
# Test
[root@localhost ~]#
Well, all that says that you can and did write to the file. You added the line "# Test" to the end of it.

Can you please explain exactly what your problem is?

Evo2.
 
Old 03-29-2010, 05:04 AM   #12
saqibsh
LQ Newbie
 
Registered: Mar 2010
Posts: 11

Original Poster
Rep: Reputation: 0
thanks dear this commamd work
gedit /etc/csh.cshrc
 
  


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
why to commit .cshrc "source .cshrc" file in every new shell session simer_anand88 Mandriva 3 10-23-2009 09:44 AM
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
csh: permission denied jjguo Linux - Newbie 14 09-17-2008 11:29 PM
what calls csh.cshrc when logging in? ron7000 SUSE / openSUSE 1 11-09-2007 07:06 PM
'permission denied" inspite of right permission flags on network drive anirudhvij Linux - Enterprise 8 05-22-2007 05:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:07 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration