(Solved)Moving files between partitions

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Re: Moving files between partitions

Postby madsaint » Mar 15th, '16, 13:07

Hi ozky,

This is what I get;
Code: Select all
[theresalouis@localhost ~]$ su - chown theresalouis:theresalouis /extra
su: user chown does not exist
[theresalouis@localhost ~]$


Regards,
madsaint
Last edited by isadora on Mar 15th, '16, 14:01, edited 1 time in total.
Reason: Placed command-output in between [CODE]-tags for better readability ;)
madsaint
 
Posts: 73
Joined: Mar 10th, '16, 18:08

Re: Moving files between partitions

Postby nigelc » Mar 15th, '16, 13:12

Hello madsaint,
It goes like this
Code: Select all
su -
Password [Put in the  root password here]
chown theresalouis:theresalouis /extra

cheers
nigelc
 
Posts: 266
Joined: Aug 28th, '11, 09:35

Re: Moving files between partitions

Postby madsaint » Mar 15th, '16, 15:46

Hi nigelc,

Followed your suggestion,
Code: Select all
[theresalouis@localhost ~]$ su-
bash: su-: command not found
[theresalouis@localhost ~]$ su-theresalouis
bash: su-theresalouis: command not found
[theresalouis@localhost ~]$ su - theresalouis
Password:
[theresalouis@localhost ~]$ chown theresalouis :theresalouis /extra
chown: cannot access ‘:theresalouis’: No such file or directory
chown: changing ownership of ‘/extra’: Operation not permitted
[theresalouis@localhost ~]$ chown theresalouis : theresalouis /extra
chown: cannot access ‘:’: No such file or directory
chown: cannot access ‘theresalouis’: No such file or directory
chown: changing ownership of ‘/extra’: Operation not permitted
[theresalouis@localhost ~]$


As you can see from the modified command, su - theresalouis, the spacings between commands matter. What should they be?

Regards,
madsaint
Last edited by doktor5000 on Mar 15th, '16, 20:28, edited 1 time in total.
Reason: added code tags
madsaint
 
Posts: 73
Joined: Mar 10th, '16, 18:08

Re: Moving files between partitions

Postby ozky » Mar 15th, '16, 19:03

ozky wrote:
Code: Select all
su -

Code: Select all
chown madsaint:madsaint /extra

Those are two different commands you need to first paste that su - to change to root then that other command.
Or if you have problems to understand paste this command to terminal.
Code: Select all
su -c "chown madsaint:madsaint /extra"
Image
Mageia user
User avatar
ozky
 
Posts: 581
Joined: Jul 2nd, '11, 08:48
Location: Nakkila Finland

Re: Moving files between partitions

Postby madsaint » Mar 15th, '16, 19:47

Hi ozky,

The second command got going. Result ;
Code: Select all
theresalouis@localhost ~]$ su -c "chown theresalouis:theresalouis /extra"
Password:
[theresalouis@localhost ~]$


Okay so... next step?
Last edited by doktor5000 on Mar 15th, '16, 20:30, edited 1 time in total.
Reason: added code tags
madsaint
 
Posts: 73
Joined: Mar 10th, '16, 18:08

Re: Moving files between partitions

Postby isadora » Mar 15th, '16, 20:06

Please madsaint, place command-output between [CODE]-tags, to improve readability, thanks ahead!!! ;)
Demo: ftp://ftp5.gwdg.de/pub/linux/mandriva/m ... e_tags.ogv
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2766
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: Moving files between partitions

Postby doktor5000 » Mar 15th, '16, 20:30

Next step is to try to create a file under /extra as your regular user. If it doesn't work, please show the output of
Code: Select all
ls -al /extra
mount|grep extra
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Moving files between partitions

Postby madsaint » Mar 15th, '16, 22:12

Hi isadora,
Sorry for the angst and thanks for the tip. Will follow it dutifully.

Hi doktor5000,
I've followed through, heres what I got;

Code: Select all
[theresalouis@localhost ~]$ su -c "chown theresalouis:theresalouis /extra"
Password:
[theresalouis@localhost ~]$  ls -al /extra
total 24
drwxr-xr-x  3 theresalouis theresalouis  4096 Mar 11 23:51 ./
drwxr-xr-x 21 root         root          4096 Mar 14 13:27 ../
drwx------  2 root         root         16384 Mar 11 23:51 lost+found/
[theresalouis@localhost ~]$ mount|grep extra
/dev/sdb5 on /extra type ext4 (rw,nosuid,nodev,noexec,relatime,data=ordered,user)
[theresalouis@localhost ~]$


Is this it?
Regards,
madsaint
madsaint
 
Posts: 73
Joined: Mar 10th, '16, 18:08

Re: Moving files between partitions

Postby madsaint » Mar 15th, '16, 22:25

Hi doktor5000,

Just tested moving files between drives, IT WORKS! Do I take it to mean that if I added another HDD and mounted it /extra1 and repeated the same steps to enable permissions I get the same results? Please confirm? All these years thinking I messed up using konsole when the last konsole was at fault, man what a load off. Look forward to your reply. If confirmed, we can gladly say
thread closed.

Once again please accept my apologies for the stress I've caused.

Regards,
madsaint
madsaint
 
Posts: 73
Joined: Mar 10th, '16, 18:08

Re: Moving files between partitions

Postby doktor5000 » Mar 16th, '16, 01:38

Looks fine so far, and yes you could repeat that. Although why do you want to add another partion as /extra1 ? In case you have more disks or partitions better use LVM, to consolidate them all into one filesystem.
It would be helpful if you would provide some more details on what you want to achieve, as mentioned previously.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Moving files between partitions

Postby madsaint » Mar 16th, '16, 03:43

Hi doktor5000,

The use of /extra and /extra1 was an earlier suggestion of benmc. Yes I would like to consolidate everything into one large filesystem with access between partitions, instead of several different partitions with different permissions. I am the only user so
separate user access is moot. LVM is new to me, I don' t know what that is. With new HDD' s now available with greater capacities, collation and consolidation will be a near term exercise. I envision having about 3 large capacity HD' s, one to handle downloads, thumb drive transfers, data cd transfers and the like, the other two to collate and categorise and store. It would suit my needs nicely. It is all I need from system storage. I never had this situation with Mandriva, so it' s surprising to me that that ability didn't' carry over to Mageia. I now know it can be achieved so I can continue as I did with Mandriva.

I will continue testing between partitions today, in case we missed something. Just to be absolutely sure. I' ll write again with the results.

No more /var, I promise.
Regards,
madsaint
madsaint
 
Posts: 73
Joined: Mar 10th, '16, 18:08

Re: Moving files between partitions

Postby nigelc » Mar 16th, '16, 04:13

madsaint,
Here is some documentation : re file systems http://www.tldp.org/LDP/intro-linux/htm ... 03_01.html

http://www.tldp.org/
cheers
NIgel.
nigelc
 
Posts: 266
Joined: Aug 28th, '11, 09:35

Re: Moving files between partitions

Postby jiml8 » Mar 16th, '16, 05:02

madsaint wrote:Hi doktor5000,

The use of /extra and /extra1 was an earlier suggestion of benmc. Yes I would like to consolidate everything into one large filesystem with access between partitions, instead of several different partitions with different permissions. I am the only user so separate user access is moot.


I would not agree that separate user access is moot. Maintaining separate user access can play a very important role in system security.

In an environment where malware is increasingly common - and where there are specific forms of malware (particularly cryptoware) that can attack Linux, maintaining separate partitions with separate permissions can give you a substantial layer of defense, with a minimal cost in inconvenience in usage.

As a specific example, my workstation has two SSDs for day to day use, and two hard drives that function mostly for archive and backup. In addition, I have a persistent connection to an iscsi share on a NAS, which also is used for backup. My SSDs contain my system (with appropriate root:root permissions) and my /home (with my user permissions). My hard drives contain a number of different directories used for different purposes, both archival and backup, and the ower:group of the vast majority of those directories is root:root, with permissions that in some cases ensure that only root can even enter the directories. The share on the NAS is owned by root and is only accessible by root.

On a daily basis, my system automatically backs up the / filesystem to a directory on one hard drive that is only accessible to root, and backs up /home to the other hard drive, again to a directory only accessible by root. Also, the entire contents of the system (including many of the directories on the hard drives that are archival) are backed up to the NAS, into directories that are only accessible by root.

Should my system be compromised by malware, that malware will only have my user permissions (presuming there is no effective privilege escalation exploit, which for the most part is a safe assumption) and therefore the malware will not be able to compromise my backups, even if it does tear up my /home directory. Should malware attack my system, and should I simultaneously experience a hard drive failure with one of the backup drives, there is still the other backup on the NAS. I also use the NAS to backup that iscsi share in a fashion that is totally inaccessible to my workstation, so even a privilege escalation attack can't wipe everything out. And, since the NAS runs FreeBSD (not Linux), there won't be any privilege escalation exploit that works on both the workstation and the NAS. Thus, one or the other will always be safe against a successful attack.

Linux is resistant to malware, but not invulnerable. And in the recent past, it has been specifically targeted. Taking steps to secure against all conceivable attacks at the time you set a system up is not a major exercise, and getting into the proper "security" mindset could save your bacon going forward.

I'm agnostic on the use of LVM on a personal system. I don't do it myself because I prefer to have my system partitioned. If you (or Doktor) don't agree, I certainly won't debate the point. But with or without LVM, configuring for security is a simply outstanding idea...and now is the time for you to do it.
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: Moving files between partitions

Postby madsaint » Mar 16th, '16, 12:57

Hi jiml8,

I've been hit by malware before, so I take your point strongly. Still deciding on what firewall / cryptoprotection to use, a little trial and I should be set.

Hi doktor5000,

Success! All works as needed. Permissions have been changed, access is allowed. I think we can close this thread. A big thank you to you and the team.

On a side note I'm starting a thread on the problems I'm now having with Nvidia. I've gone through the viideo thread and I've found disparate threads on what I think would help, oddly they happen to be by you. Hope you can help.

You have my gratitude,
madsaint
madsaint
 
Posts: 73
Joined: Mar 10th, '16, 18:08

Re: Moving files between partitions

Postby doktor5000 » Mar 16th, '16, 19:50

As a general hint and golden rule: Please only one problem per thread ;)

Please mark the thread accordingly by editing the topic of the first post and prefix it by [SOLVED], thanks
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Previous

Return to Basic support

Who is online

Users browsing this forum: Google [Bot] and 1 guest