Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Root user files storage
Root user files storage
Hi
When I'm using the root account and save files in root home folders - on which partition are they stored? Do they stay on system partition or the /home partition? Here is my partition scheme:
Also, on a different topic, is there a way to change the numbers? Not a big deal but I would like to have Partition 1, 2, 3 instead of 1, 2, 5, 6.
When I'm using the root account and save files in root home folders - on which partition are they stored? Do they stay on system partition or the /home partition? Here is my partition scheme:
Also, on a different topic, is there a way to change the numbers? Not a big deal but I would like to have Partition 1, 2, 3 instead of 1, 2, 5, 6.
Re: Root user files storage
Roots home is in /rootforneus wrote: When I'm using the root account and save files in root home folders - on which partition are they stored? Do they stay on system partition or the /home partition? Here is my partition scheme:
Not without moving stuff around. 5 and 6 are extended partitions inside primary partition 2. You can have only 4 primary partitions. That's why extended partitions start at number 5.forneus wrote: Also, on a different topic, is there a way to change the numbers? Not a big deal but I would like to have Partition 1, 2, 3 instead of 1, 2, 5, 6.
Re: Root user files storage
Thanks for the reply. Clear about numbering. Gonna leave it as it is for now.
As for the /root - still not clear, sorry. By saving files as root am I going to fill the Partition 1 (30Gb only) or do they go to Partition 2 (and then I'm not worrying about space limits)?
The reason I ask is that I plan to use root account to hide some big files and access them as root only. I know there is the .dot way and the encryption applets way but I don't want to do that. So I'm curious how much space I am going to have after saving files as root and which partition is going to have those files.
As for the /root - still not clear, sorry. By saving files as root am I going to fill the Partition 1 (30Gb only) or do they go to Partition 2 (and then I'm not worrying about space limits)?
The reason I ask is that I plan to use root account to hide some big files and access them as root only. I know there is the .dot way and the encryption applets way but I don't want to do that. So I'm curious how much space I am going to have after saving files as root and which partition is going to have those files.
Re: Root user files storage
How did you partition your hard drive?
Code: Select all
russel@NUC-G:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
└─sda1 8:1 0 111.8G 0 part /home
sdb 8:16 0 29.5G 0 disk
├─sdb1 8:17 0 20G 0 part /
└─sdb2 8:18 0 9.5G 0 part [SWAP]
Re: Root user files storage
RU55EL wrote:How did you partition your hard drive?
Code: Select all
russel@NUC-G:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 111.8G 0 disk └─sda1 8:1 0 111.8G 0 part /home sdb 8:16 0 29.5G 0 disk ├─sdb1 8:17 0 20G 0 part / └─sdb2 8:18 0 9.5G 0 part [SWAP]
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Root user files storage
The /root directory contents is on the / (root) filesystem. If it was on the /home filesystem it would be /home/root, not /root. The reason is that the root home directory must be available even if /home or any other filesystem fails to mount, so that the root user can log in and fix things.forneus wrote:As for the /root - still not clear, sorry. By saving files as root am I going to fill the Partition 1 (30Gb only) or do they go to Partition 2 (and then I'm not worrying about space limits)?
IMO, you should not use /root for heavy storage. If you want to store big files as root, just create a /home/root directory and save files there.
When you want to check on which filesystem a directory is, you can use the "df" command.
Code: Select all
df /root
Yes. This requires to change the logical partitions into primary partitions or to convert the partition table to GPT and change the partition numbers.forneus wrote:is there a way to change the numbers? Not a big deal but I would like to have Partition 1, 2, 3 instead of 1, 2, 5, 6.
You can use sfdisk to change logical partitions into primary partitions. Handle with care.
1) Dump the partition table.
Code: Select all
sfdisk -d /dev/sda > sda.ptbl
3) Write the new partition table to the disk.
Code: Select all
sfdisk--no-reread /dev/sda < sda.ptbl
Last edited by p.H on 2017-11-08 07:40, edited 1 time in total.
Re: Root user files storage
So just to be clear: I create /home/root (while in root account?) and and it's not going to be on a 30G system partition?
As for the changing numbering process: I don't need to reinstall Debian again? I thought dumping and writing new partition tables messes up everything and one does it only while installing OS. Does it really matter in terms of performance which numbers are assigned?
As for the changing numbering process: I don't need to reinstall Debian again? I thought dumping and writing new partition tables messes up everything and one does it only while installing OS. Does it really matter in terms of performance which numbers are assigned?
Re: Root user files storage
Is this a joke of some sort? This installation I'm running right now has been in use over 9 years and there is less than 1 MB in /root. Just a few notes, handwritten logs about upgrades. Something is seriously wrong if your /root is filling up.
Re: Root user files storage
No jokes. After installation I first logged in as root. And /root had all regular folders(Documents, Music, Video..) so I assumed that root account can be used as /home. I let Debian do the partitioning during installation and I did not create any volumes. Now my question is can I store my personal files in, for example, /root/Documents (it already exists). These root folders belong only to a 30GB system volume or they can use my extended file partition (see screen shot above)?Segfault wrote:Is this a joke of some sort? This installation I'm running right now has been in use over 9 years and there is less than 1 MB in /root. Just a few notes, handwritten logs about upgrades. Something is seriously wrong if your /root is filling up.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Root user files storage
by forneus »So I'm curious how much space I am going to have after saving files as root and which partition is going to have those files.
I am thinking maybe it is, even though the OP says it isn't. I mean look at the logic involved,... How could any one guess the answer to this , without knowing the size of the files to be saved ?by Segfault » 2017-11-07 16:59
Is this a joke of some sort?
Of course the OP should know the size of any files they save, and logic would
dictate:. If you save a 3 gb file, in a directory or partition that has 30gb, then
you would have 27 gb space left.
One could save any files to any directory on any partition, where they get saved depends entirely on where the system is told to save them.
One can use chown, chmod, and chgrp to set the ownership and permissions
in such a way that only root has access. It does not even need to be in /root.
The logical thing to do is use the 'mkdir' command, make a directory in the big
partition, the one with the most room, it could be named /root-2 or /home or /mysecretfiles ,/home/root ...... what ever, just make sure the owner is root, and no others have permission to access it. Then save your secret files to that partition and directory.
Keep in mind, simply making/naming a directory "root" does not mean root is the owner, and others can not read or write to it, you need to set the permissions as desired .
If your /root dir is full, as root you can use the 'mv' command and move any files that you choose to another partition or directory of your choice. Just be sure not to move files that are system files and needed in the /root dir for system operation.
Code: Select all
man mv
Last edited by GarryRicketson on 2017-11-08 00:23, edited 1 time in total.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Root user files storage
It can if you are not experienced and care full, but it can be done with out messing anything up. In any event , you should all ways make a good back upI thought dumping and writing new partition tables messes up everything and one does it only while installing OS.
before doing this, not just for changing partition tables , but any thing that
effects the system. If you make and have a good back up, "messing everything up" is not a problem, you can all ways restore it to the way it was with the back up. If you do not have a good backup made, make one before you start changing partitions, you should make one any way.
Note what is said:
Here is a screen shot, I made a directory in my /home/garry directory, I namedby p.H »You can use sfdisk to change logical partitions into primary partitions. Handle with care.
it "mysecretfiles", the name does not matter, it could be named root if so desired, however as I mentioned earlier, just naming it root, does not make it
owned by root, you need to learn how to set ownership and permissions, etc,
As mentioned by :
It is a really bad idea to be using the /root directory for user files, like you have been.Post by Segfault » 2017-11-07 18:11
root account is not an user account, it is an admin account.
If you have files that you do not want other to be able to access, that is fine, but you should be doing all of this in your home directory, not root's, ...
Last edited by GarryRicketson on 2017-11-08 09:18, edited 1 time in total.
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
Re: Root user files storage
where's the general-purpose write-up to link to in cases like these?
not sure how to characterize it; cases where a newb decides to do some mid-level stuff instead of staying with mint cinnamon, and takes a fundamentally wrong turn somewhere in the beginning - cases where "of course you can do it like that, but you really shouldn't" should be backed by a linked article?
you know, like the "smart questions" link?
not sure how to characterize it; cases where a newb decides to do some mid-level stuff instead of staying with mint cinnamon, and takes a fundamentally wrong turn somewhere in the beginning - cases where "of course you can do it like that, but you really shouldn't" should be backed by a linked article?
you know, like the "smart questions" link?
- dilberts_left_nut
- Administrator
- Posts: 5346
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Root user files storage
I thought that was disabled by default (because it's a bad idea) - what Display Manager and DE are you using? (or did you search up a 'workaround' when it wouldn't let you?).forneus wrote:After installation I first logged in as root.
You assume wrong. Those are created on first (graphical) login to a DE implementing the xdg specs, which, again, is a bad idea as root.And /root had all regular folders(Documents, Music, Video..) so I assumed that root account can be used as /home.
You should just create a second regular user and use that to "hide" your files from yourself.I let Debian do the partitioning during installation and I did not create any volumes. Now my question is can I store my personal files in, for example, /root/Documents (it already exists). These root folders belong only to a 30GB system volume or they can use my extended file partition (see screen shot above)?
AdrianTM wrote:There's no hacker in my grandma...
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Root user files storage
It's going to be on the filesystem containing /home/*. If /dev/sda5 is mounted on /home, then /home/root will be on /dev/sda5.forneus wrote:So just to be clear: I create /home/root (while in root account?) and and it's not going to be on a 30G system partition?
But you'll have to save files somewhere in /home/root explicitly, or replace standard directories in /root with symbolic links pointing to directories in /home/root.
Anyway, as others replied, you should not use the root account for everyday use. Root is for administrative tasks only.
No, you do not have to reinstall if you don't mess up.forneus wrote:As for the changing numbering process: I don't need to reinstall Debian again? I thought dumping and writing new partition tables messes up everything and one does it only while installing OS. Does it really matter in terms of performance which numbers are assigned?
No, it does not matter at all in terms of performance. IMO, it is not worth it.
Re: Root user files storage
You can always rbind a directory to another file system on another drive.
Debian 9 (Stretch)
Asus Vivobook S551LB
Asus Vivobook S551LB