StevieBruce
Posts: 1
Joined: Mon Aug 13, 2012 7:07 pm

Root folder

Mon Aug 13, 2012 7:15 pm

Hi guys,
I'm trying to find some folders that have been placed in the root folder (I need to edit the code inside one of the files). I can access and see the files that are located inside the Root folder fine on LXTerminal, but when I try to access the Root folder from the File Manager, I constantly get the message that my permission has been denied.
Is it possible to access this folder? Or if not, is there a way I can edit the contents of a file through LXTerminal?

Any help would be appreciated,
StevieBruce

User avatar
joan
Posts: 15116
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Root folder

Mon Aug 13, 2012 8:17 pm

If the files are visible from the lxterminal it may be simplest to edit them with vi or nano.

KCarscadden
Posts: 57
Joined: Sat Jun 09, 2012 9:00 pm
Location: Canada

Re: Root folder

Mon Aug 13, 2012 8:29 pm

Edit using any editor, using

sudo <editor> <file>

vinntec
Posts: 148
Joined: Thu Aug 02, 2012 9:37 am
Location: Basingstoke, UK

Re: Root folder

Mon Aug 13, 2012 10:18 pm

StevieBruce wrote:Hi guys,
I'm trying to find some folders that have been placed in the root folder (I need to edit the code inside one of the files). I can access and see the files that are located inside the Root folder fine on LXTerminal, but when I try to access the Root folder from the File Manager, I constantly get the message that my permission has been denied.
Is it possible to access this folder? Or if not, is there a way I can edit the contents of a file through LXTerminal?

Any help would be appreciated,
StevieBruce
When you open file manager, you can use "View" to show the hidden files if necessary, and "Tools" --> "Open current folder as root" to have access equivalent to sudo. Peter

mirc3a91
Posts: 8
Joined: Sat Mar 01, 2014 7:22 pm

Re: Root folder

Tue Jun 10, 2014 2:17 pm

Hi guys,

I have slightly the same problem, except that I need to copy a file from the root folder to the home/pi folder and it denies me...
Can anyone help please?

Much obliged

User avatar
RaTTuS
Posts: 10614
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Root folder

Tue Jun 10, 2014 2:27 pm

mirc3a91 wrote:Hi guys,

I have slightly the same problem, except that I need to copy a file from the root folder to the home/pi folder and it denies me...
Can anyone help please?

Much obliged
sudo cp /root/file /home/pi
sudo chown pi:users /home/pi/file
where file is the name of the file
Last edited by RaTTuS on Tue Jun 10, 2014 3:45 pm, edited 1 time in total.
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

mirc3a91
Posts: 8
Joined: Sat Mar 01, 2014 7:22 pm

Re: Root folder

Tue Jun 10, 2014 3:01 pm

RaTTuS wrote:
mirc3a91 wrote:Hi guys,

I have slightly the same problem, except that I need to copy a file from the root folder to the home/pi folder and it denies me...
Can anyone help please?

Much obliged
sudo cp /root/file /home/pi
sudo chown pr:users /home/pi/file
where file is the name of the file
For the sudo chown pr:users /home/pi/file command I get the following error: chown: invalid user: 'pr:users'

DirkS
Posts: 10453
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Root folder

Tue Jun 10, 2014 3:33 pm

Look like a typo and should be 'pi:users'
The command changes the ownership of the file to user 'pi', group 'users'.

HTH
Dirk.

User avatar
RaTTuS
Posts: 10614
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Root folder

Tue Jun 10, 2014 3:45 pm

DirkS wrote:Look like a typo and should be 'pi:users'
The command changes the ownership of the file to user 'pi', group 'users'.

HTH
Dirk.
it was and it is .. sorry about that [updated]
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
ben_nuttall
Posts: 235
Joined: Sun Aug 19, 2012 11:19 am
Location: Cambridgeshire, UK
Contact: Website Twitter

Re: Root folder

Tue Jun 10, 2014 5:13 pm

You could run a command to open the file manager window as root.

For example on Ubuntu you could run

Code: Select all

sudo nautilus
However I don't know the name of the file manager app we use on Raspbian.
Former RPF staff. Author of gpiozero and creator of piwheels.

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Root folder

Tue Jun 10, 2014 5:54 pm

It's PCManFM (pcmanfm).


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

aXeRepublic
Posts: 2
Joined: Sun Jun 29, 2014 4:43 am

Re: Root folder

Sun Jun 29, 2014 4:52 am

Err... Guys?
I want to copy a folder from /home/pi TO the /root folder... I tried reversing the solution you guys gave up there like this:
"sudo cp /root/file /home/pi" and changed it like this:
"sudo cp/home/pi/file /root"
It gives me an error message saying:
" ' /home/pi/file' : No such file or directory "
I use a Raspbian OS on my Raspberry Pi.
I want to install a Wi-Fi Adapter Driver which goes like this:
"rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116.tar"
In the manual, they said:

"For example, to decompress rtl8188C_8192C_8192D_usb_linux_v3.3.0_2920.20111123.tar.gz:

root@driver/# tar zxvf rtl8188C_8192C_8192D_usb_linux_v3.3.0_2920.20111123.tar.gz "

Please Help!

DirkS
Posts: 10453
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Root folder

Sun Jun 29, 2014 1:18 pm

" ' /home/pi/file' : No such file or directory "
Well, this tells me that 'file' does not exist in the home directory.

Have you checked that it actually *does* exist, using 'ls'?
Maybe there's a typo in the name?

Gr.
Dirk.

RaspberryPiFan
Posts: 2
Joined: Sun Jul 12, 2015 1:28 am

Re: Root folder

Sat Jan 16, 2016 1:32 am

Just run

Code: Select all

sudo pcmanfm
and then copy the files normally.

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: Root folder

Sat Jan 16, 2016 9:19 am

It doesn't help when someone revives an old topic with "I have the same problem". It is even more unhelpful to revive one to add something to an old post that has already been resolved, even though your solution is slightly different. Don't let this put you off though, there are plently of current posts to help with ;)

anonymousr
Posts: 1
Joined: Sun Jan 22, 2017 12:10 am

Re: Root folder

Sun Jan 22, 2017 12:19 am

You can use

Code: Select all

sudo su 
then use the mv command

Code: Select all

mv /root/file /home/pi
file is filename :D

Return to “Beginners”