LinuxQuestions.org
Visit Jeremy's Blog.
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 02-03-2011, 08:20 AM   #1
MODYSAMA
Member
 
Registered: Dec 2010
Posts: 144

Rep: Reputation: 0
Question Change permission inquire.


Quote:
sok@sok-HP-ProBook-4520s:/etc/modprobe.d$ sudo chmod +x modprobe.d
chmod: cannot access `modprobe.d': No such file or directory
sok@sok-HP-ProBook-4520s:/etc/modprobe.d$ cat> new.conf
bash: new.conf: Permission denied
I tried it with sudo and without it.
Excuse me, What the wrong I do!?
 
Old 02-03-2011, 08:25 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
Hi,

Sudo might not be aware of where you are standing when you execute the chmod command.

Try: sudo chmod +x /etc/modprobe.d


You are standing in the wrong directory..... You are in /etc/modprobe.d and try to chmod modprobe.d. You need to be in /etc.

Hope this helps.

Last edited by druuna; 02-03-2011 at 08:27 AM.
 
1 members found this post helpful.
Old 02-03-2011, 08:25 AM   #3
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,614

Rep: Reputation: 450Reputation: 450Reputation: 450Reputation: 450Reputation: 450
Since you are already in modprobe.d your command does not see the modprobe.d folder.
Try
sudo chmod +x .
or
sudo chmod +x ../modprobe.d

[Edit]
Or give full path as suggested by druuna

Last edited by crts; 02-03-2011 at 08:27 AM.
 
1 members found this post helpful.
Old 02-03-2011, 08:35 AM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
It looks like you're in /etc/modprobe.d; simply
Code:
cd /etc
chmod +x modprobe.d
By the way, /etc/modprobe.d is, by default
Code:
drwxr-xr-x  2 root root     4096 2010-07-01 10:10 modprobe.d/
So, adding execute permission would have no effect; and the conf file that are in it (yours may vary) are
Code:
drwxr-xr-x  2 root root  4096 2010-07-01 10:10 ./
drwxr-xr-x 81 root root 12288 2011-02-02 15:38 ../
-rw-r--r--  1 root root   131 2010-04-27 17:47 BLACKLIST-nouveau.conf
-rw-r--r--  1 root root  6251 2009-08-14 10:06 blacklist.conf
-rw-r--r--  1 root root   128 2010-05-02 04:11 bluetooth.conf
-rw-r--r--  1 root root   177 2010-07-01 10:10 dgc
-rw-r--r--  1 root root     0 2010-07-01 10:10 dgc.conflicts
-rw-r--r--  1 root root   443 2009-05-29 21:25 isapnp.conf
-rw-r--r--  1 root root   265 2009-08-14 10:04 psmouse.conf
-rw-r--r--  1 root root    64 2010-06-29 13:47 sound
-rw-r--r--  1 root root   244 2009-05-29 21:25 usb-controller.conf
You may not want to mess with them unless you know exactly what you're doing and why, eh?

Essentially, if you want to change the permission mask on a file or directory, you either need to be one directory level above (so you can ls -l name-of-file-or-directory), use absolute path, or use relative path; e.g., in the directory use the "dot-dot;" e.g., in /etc/modprobe.d you can ls ../modprobe.d (or chmod or whatever).

Hope this helps some.
 
1 members found this post helpful.
Old 02-03-2011, 09:14 AM   #5
MODYSAMA
Member
 
Registered: Dec 2010
Posts: 144

Original Poster
Rep: Reputation: 0
Many thank for all.
still have the problem.

Quote:
sok@sok-HP-ProBook-4520s:~$ cd /etc
sok@sok-HP-ProBook-4520s:/etc$ chmod +x modprobe.d
chmod: changing permissions of `modprobe.d': Operation not permitted
Quote:
sok@sok-HP-ProBook-4520s:/etc$ sudo chmod +x modprobe.d
sok@sok-HP-ProBook-4520s:/etc$ cd modprobe.d
sok@sok-HP-ProBook-4520s:/etc/modprobe.d$ cat> x.conf
bash: x.conf: Permission denied
I only can create while booting (2.6.35-22 generic (recovered) and prompt root shell ).
please need to do it throught inside Kubuntu.
 
Old 02-03-2011, 09:30 AM   #6
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,614

Rep: Reputation: 450Reputation: 450Reputation: 450Reputation: 450Reputation: 450
Quote:
Originally Posted by MODYSAMA View Post
Many thank for all.
still have the problem.

I only can create while booting (2.6.35-22 generic (recovered) and prompt root shell ).
please need to do it throught inside Kubuntu.
You are trying to create a file as a normal user. You do not have this permission. Try
sudo cat > x.conf

instead. CAREFUL: If you already have a file called x.conf in that folder then it will be truncated and all data it contains will be lost!
Maybe you should elaborate on what you are actually trying to achieve. Then maybe we can provide some more effective advice.
 
Old 02-03-2011, 09:44 AM   #7
MODYSAMA
Member
 
Registered: Dec 2010
Posts: 144

Original Poster
Rep: Reputation: 0
I tried it.. but
Quote:
sok@sok-HP-ProBook-4520s:/etc$ sudo chmod +x modprobe.d
sok@sok-HP-ProBook-4520s:/etc$ cd modprobe.d
sok@sok-HP-ProBook-4520s:/etc/modprobe.d$ sudo cat> x.conf
bash: x.conf: Permission denied
 
Old 02-03-2011, 10:05 AM   #8
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,614

Rep: Reputation: 450Reputation: 450Reputation: 450Reputation: 450Reputation: 450
Quote:
Originally Posted by MODYSAMA View Post
I tried it.. but
My bad. Try
sudo -s 'cat > x.conf'

from within /etc/modprobe.d
 
Old 02-03-2011, 10:24 AM   #9
MODYSAMA
Member
 
Registered: Dec 2010
Posts: 144

Original Poster
Rep: Reputation: 0
Thumbs up

Crts really many thanks for being helpful.
Quote:
sudo -s 'cat > x.conf'
it works thanks my ALLAH.
 
  


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 change permission Uruclef Linux - Hardware 2 06-05-2006 01:31 PM
change of permission in cp n mv Jeet Linux - Newbie 1 03-17-2006 07:10 AM
Can't change permission karpa Linux - Newbie 29 03-15-2006 05:20 PM
Need ACCESS to change files! Every time I try to change a setting,"Permission Denied" Balarabay1 SUSE / openSUSE 2 03-06-2006 09:54 AM
change permission alma Linux - Newbie 5 10-28-2005 10:17 PM


All times are GMT -5. The time now is 03:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration