You are not logged in.

#1 2020-07-21 19:22:49

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

[SOLVED] Giving permission to write data on home partition

Hello, this is my first post as I am very new to Arch-Linux. I have installed KDE as my desktop environment in my root partition, my issue is that I cannot paste files into my home partition and whenever I click in to read the files in my home partition I have too enter my root password. Any help would be appreciated and if you would like more info then simply ask.

Last edited by aaron4atkinson (2020-07-24 22:47:45)

Offline

#2 2020-07-21 19:28:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,743

Re: [SOLVED] Giving permission to write data on home partition

You're not supposed to have write access to the /home partition as regular user - only your $HOME.
What's the output of "ls -la /home"?

Offline

#3 2020-07-21 19:33:40

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

Re: [SOLVED] Giving permission to write data on home partition

The output is
total 12
drwxr-xr-x  3 root   root   4096 Jul 20 01:19 .
drwxr-xr-x 17 root   root   4096 Jul 19 20:35 ..
drwx------ 11 aaronn aaronn 4096 Jul 21 10:57 aaronn

Offline

#4 2020-07-21 19:36:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,743

Re: [SOLVED] Giving permission to write data on home partition

So, you shoud™ have writing access to /home/aaronn (which should be the output of "echo $HOME") but not /home - which is expected.
Why do you want to write into /home?

Offline

#5 2020-07-21 19:37:27

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

Re: [SOLVED] Giving permission to write data on home partition

I thought I was supposed to store most of my things there. At current I cannot save new programs and information to my home folder from the desktop, only my root partition which is just 50Gbs in size

Offline

#6 2020-07-21 19:42:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,743

Re: [SOLVED] Giving permission to write data on home partition

Where does that "home folder" point (ie. which path does it resolve)?

Offline

#7 2020-07-21 19:46:12

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

Re: [SOLVED] Giving permission to write data on home partition

When I set up the home folder I put it under /mnt then mounted sda3 (my home partition) to it when I installed arch-linux

Offline

#8 2020-07-21 19:50:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,743

Re: [SOLVED] Giving permission to write data on home partition

WHAT?

What's the output of

lsblk -f
cat /etc/fstab
echo $HOME
grep aaronn /etc/passwd # this does not reveal a password

Offline

#9 2020-07-21 20:06:22

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

Re: [SOLVED] Giving permission to write data on home partition

lsblk:
NAME   FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                           
|-sda1 swap   1           dcd33050-e494-4e6d-a17f-6e7234fcb891                [SWAP]
|-sda2 ext4   1.0         eecbc203-6163-484a-85e4-5db00be55021   31.4G    31% /
`-sda3 ext4   1.0         9a1b7276-37c5-4e9b-9b1e-70bb72603f6d    1.8T     0% /mnt

cat/etc/fstab:
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda2
UUID=eecbc203-6163-484a-85e4-5db00be55021       /               ext4            rw,relatime     0 1

# /dev/sda1
UUID=dcd33050-e494-4e6d-a17f-6e7234fcb891       none            swap            defaults        0 0

echo $HOME:
/home/aaronn

grep aaronn /etc/passwd:
aaronn:x:1000:1000::/home/aaronn:/bin/bash



Did I setup the partitions incorrectly? To clarify I mounted sda3 to a file at /mnt/home

Offline

#10 2020-07-21 20:08:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,743

Re: [SOLVED] Giving permission to write data on home partition

You want to mount it to "/home"
Which tutorial did you follow to install archlinux?

Offline

#11 2020-07-21 20:14:19

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

Re: [SOLVED] Giving permission to write data on home partition

I just followed the archlinux tutorial on the wiki

Offline

#12 2020-07-21 20:20:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,743

Re: [SOLVED] Giving permission to write data on home partition

You were supposed to mount it to /mnt before arch-chroot'ing and "https://wiki.archlinux.org/index.php/In … uide#Fstab" would have gotten you a different /etc/fstab…

Anyway, mount sda3 to /home. You should be good.

Notice!
You may want to "sudo cp -a /home/aaronn /mnt" first (so it will exist in the new /home path) and if everything works, delete it from the UNMOUNTED /home (so you won't get warnings about /home not being empty when mounting sda3 there)

Offline

#13 2020-07-21 20:35:41

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

Re: [SOLVED] Giving permission to write data on home partition

When I run the command "sudo cp -a /home/aaronn/mnt" it gives me this response
cp: missing destination file operand after '/home/aaronn/mnt'
Try 'cp --help' for more information.

shouldn't I just use mkdir to make a new file? Also when I reboot the computer in unmounts sda3 from home, how should I fix that

Offline

#14 2020-07-21 20:39:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,743

Re: [SOLVED] Giving permission to write data on home partition

Sorry, botched the space key…
"sudo cp -a /home /aaronn /mnt"

how should I fix that

By adding an entry to /etc/fstab…

Are you sure you followed the installation guide?
I'd review it and check which steps you might have missed/skipped/ignored…

Offline

#15 2020-07-21 21:53:08

rowdog
Member
From: East Texas
Registered: 2009-08-19
Posts: 118

Re: [SOLVED] Giving permission to write data on home partition

I believe Seth actually meant

sudo cp -a /home/aaronn /mnt

Offline

#16 2020-07-21 22:06:21

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

Re: [SOLVED] Giving permission to write data on home partition

I went back in through my arch setup hardrive and generated the fstab file after running the command you said I should. It said that the file directory "aaronn" did not exist. I also mounted the aprtitions as it says in the install guide before generating the fstab file. My issue is that no matter what I do the fstab file doesn't seem to "stick" and whenever I reboot my computer and run nano too view the file it gives me an error saying it does not exist.

Should I just manually make an fstab file and put in all of the info?

Offline

#17 2020-07-21 22:27:42

loqs
Member
Registered: 2014-03-06
Posts: 19,048

Re: [SOLVED] Giving permission to write data on home partition

After you performed Installation_guide#Mount_the_file_systems what is the output of

findmnt /mnt

Offline

#18 2020-07-21 22:34:03

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

Re: [SOLVED] Giving permission to write data on home partition

After running findmnt /mnt I got the result
TARGET SOURCE             FSTYPE     OPTIONS
/mnt         /dev/sda2             ext4            rw,relatime

Offline

#19 2020-07-21 22:44:24

loqs
Member
Registered: 2014-03-06
Posts: 19,048

Re: [SOLVED] Giving permission to write data on home partition

Which explains why genfstab is not  creating an entry for /home as there is nothing mounted at /mnt/home.

Offline

#20 2020-07-21 23:01:58

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

Re: [SOLVED] Giving permission to write data on home partition

Alright, I mounted sda2 @ /mnt and sda3 @ /mnt/home
I used findmnt at both /mnt and /mnt/home and the partitions are in the right place. I used the command "genfstab -U /mnt >> /mnt/etc/fstab". I've realized that the fstab files are simply not coming up because I was trying to view them outside of startup. Both sda2 and sda3 are there and under type sda3 is recorded as /home.

Is there anything else I should do?

Offline

#21 2020-07-21 23:06:14

loqs
Member
Registered: 2014-03-06
Posts: 19,048

Re: [SOLVED] Giving permission to write data on home partition

Check that /mnt//home/aaronn exists,  inside the chroot would be /home/aaronn.  If the cp command succeeded in copying the home directory it should exist.

Last edited by loqs (2020-07-21 23:06:33)

Offline

#22 2020-07-21 23:41:19

aaron4atkinson
Member
Registered: 2020-07-21
Posts: 27

Re: [SOLVED] Giving permission to write data on home partition

The file exists, Plasma is failing to load the desktop after login. I'm guessing the best way to solve that issue would be to redownload the desktop and remake the users. Am I correct in doing this?

Offline

#23 2020-07-21 23:58:56

loqs
Member
Registered: 2014-03-06
Posts: 19,048

Re: [SOLVED] Giving permission to write data on home partition

If the issue is caused by files in the user's home directory not belonging to that user that can be fixed without having to recreate the user.

# find /home/aaronn  \! -uid 1000 -o \! -gid 1000

Offline

Board footer

Powered by FluxBB