LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > elementary OS
User Name
Password
elementary OS This forum is for the discussion of elementary Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 08-31-2021, 12:46 PM   #1
joden1
Member
 
Registered: Jun 2020
Posts: 94

Rep: Reputation: Disabled
SOLVED:I need to access and add a file to the /etc/udev/rules.d folder - how do I access it as root?


I've got an external device that uses a small app to update firmware, however it needs me to add a file to the folder indicated above.

It is a root account folder so I need to temporarily access it to add the file.

How can I do this?
Thanks

Last edited by joden1; 08-31-2021 at 01:56 PM.
 
Old 08-31-2021, 12:52 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
With su or sudo

See:
man su
man sudo
 
Old 08-31-2021, 12:58 PM   #3
joden1
Member
 
Registered: Jun 2020
Posts: 94

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by teckk View Post
With su or sudo

See:
man su
man sudo
Thanks, but tbh, that doesn't mean that much to me?? Well, I know what SUDO is and I have used it many times for various task, but changing the permissions for a root folder is not something I have looked at before. I assume changing the permissions is the way to go on this?

How do I apply that to open the folder and allow a file to be placed in it? Where and how do I run that command (if it is a command?)

Last edited by joden1; 08-31-2021 at 01:01 PM.
 
Old 08-31-2021, 01:11 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,927

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
it looks like you do not really understand how does it work. Only the user root has right to place a file into that folder. So you need to use either su or sudo to change the current user to root [to be able to do that].
You do not need to change the permission of any folder.
 
Old 08-31-2021, 01:16 PM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,611
Blog Entries: 19

Rep: Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458
Quote:
Originally Posted by pan64 View Post
You do not need to change the permission of any folder.
And you shouldn't change the permissions or ownership of system folders anyway. They are the way they are for a reason.
 
Old 08-31-2021, 01:28 PM   #6
joden1
Member
 
Registered: Jun 2020
Posts: 94

Original Poster
Rep: Reputation: Disabled
Yes I already know that! But you folks seem to post instructions as if people asking were already experts in Linux!! And if that were the case, we wouldn't be asking questions!

All I want to do is insert a simple text file into that folder.....sheesh! this is like extracting hens teeth! No offence meant but tbh, folks need to understand that not everyone new to linux is an expert! Please try to remember YOU were once a novice.

I ask a simple question, and I get some cryptic reply, then one saying I really don't understand (well, and no offence, but duh! that's WHY I'm asking) and then the last saying that permissions are there for a reason. None of these even remotely go to an answer to the OP.

I have found how to get to root in the terminal, which is all fine, but that gets me no closer to how to add a text file to that folder. Do I run nano in that root terminal? Can I run a text editor outside the terminal?

I'll probably get upbraided now for "attitude"!
 
Old 08-31-2021, 01:45 PM   #7
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
What file manager are you using? This works in some, like thunar... Type (or paste) the following into the address bar:
admin:///etc/rules/udev.d
Yes, three slashes. You can also start at root and click you way there from:
admin:///

You'll be prompted for password twice.

Alternatively, you can use sudo from terminal to launch an editor, sure. like
sudo nano /etc/rules/udev.d/newfile

You'll be prompted for password once.

Last edited by enigma9o7; 08-31-2021 at 01:52 PM.
 
Old 08-31-2021, 01:45 PM   #8
joden1
Member
 
Registered: Jun 2020
Posts: 94

Original Poster
Rep: Reputation: Disabled
Issue is solved. I installed Nautilus as the file explorer and ran it as root. DuckDuckGo gave me the answer. It's a shame the "dedicated" EOS forum couldn't
 
Old 08-31-2021, 01:47 PM   #9
joden1
Member
 
Registered: Jun 2020
Posts: 94

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by enigma9o7 View Post
What file manager are you using? This works in some, like thunar...
admin:///etc/rules/udev.d
Type (or paste) that into the address bar. Yes, three slashes. You can also start at root with admin:///

You'll be prompted to password twice.
Thanks for that, I appreciate the reply and the hint! See above I managed to sort it going a different way. But I WILL put that line in my linux tips file
 
Old 08-31-2021, 01:53 PM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,927

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
Quote:
Originally Posted by joden1 View Post
Yes I already know that! But you folks seem to post instructions as if people asking were already experts in Linux!! And if that were the case, we wouldn't be asking questions!
You can definitely tell us you don't understand the answer, and we will try to give you better answers. From my side it is ok.
Quote:
Originally Posted by joden1 View Post
All I want to do is insert a simple text file into that folder.....sheesh! this is like extracting hens teeth! No offence meant but tbh, folks need to understand that not everyone new to linux is an expert! Please try to remember YOU were once a novice.
Actually we have no any idea about your practice, knowledge, so sometimes yes, not that easy to give the correct answer.
Quote:
Originally Posted by joden1 View Post
I ask a simple question, and I get some cryptic reply, then one saying I really don't understand (well, and no offence, but duh! that's WHY I'm asking) and then the last saying that permissions are there for a reason. None of these even remotely go to an answer to the OP.
So please try to understand. It looks like you know how to be root, so at least the first step is ok.
Quote:
Originally Posted by joden1 View Post
I have found how to get to root in the terminal, which is all fine, but that gets me no closer to how to add a text file to that folder. Do I run nano in that root terminal? Can I run a text editor outside the terminal?
You can definitely use nano, if you wish, or you can use your favorite text editor. You can also run a text editor outside, but based on your answers would be better to use nano - to add that file to the folder indicated above.
 
Old 08-31-2021, 01:56 PM   #11
joden1
Member
 
Registered: Jun 2020
Posts: 94

Original Poster
Rep: Reputation: Disabled
@pan64 thanks for the reply. Seems you do understand

As I wrote above, I finally got it sorted out via an external method. So I'll mark it as solved.

cheers
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /etc/udev/rules.d/40-libsane.rules and /etc/udev/rules.d/S99-2000S1.rules missing LABEL=libsane_rules_end mumahendras3 Slackware 6 03-09-2020 02:27 AM
[SOLVED] /etc/udev/rules.d/70-persistent-net.rules and 'ip link' rename rakeafake Linux - Networking 4 02-01-2016 08:34 PM
Slack 13.1 : /etc/udev/rules.d70-persistent-net.rules Ramurd Slackware 10 02-18-2011 09:56 AM
How to edit "/etc/udev/rules.d/40-basic-permissions.rules" file cygan Linux - Newbie 11 03-09-2009 05:22 AM
cat: /etc/udev/rules.d/70-persistent-net.rules: No such file or directory rcg1984 Linux From Scratch 2 09-17-2008 07:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > elementary OS

All times are GMT -5. The time now is 12:13 PM.

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