PCLinux Running Debian 11

Post update…
In my decision to shrink and create another ext4 partition, I ran into more issues, mostly
permission issues. Now the partition creation is quite easy, just use gparted and create the
partition, did not work so I deleted and used cfdisk to create the partition. But to be able to have write and read permission is another thing. While Foss and several others had some great readings on the subject, none seemed to work for me, so I cobbled together a few commands and away I went, I think my time spent with Gentoo has really helped me to solve issues.
So I open a root command prompt and started hacking away:
#1 I type “cfdisk” at the prompt and enter “mkfs.ext4 /dev/sda4” write the partition and quit
#2 type “lsblk” to show all partitions
#3 Run “mkdir /media/data”
#4 Run “mount /dev/sda4 /media/data”
#5 Run “chown -R :users /media/data” I believe this changes ownership
#6 Run “chmod -R g+rw /media/data” I believe this gives permissions needed
#7 Run “nano /etc/fstab” to edit the fstab file
#8 This is my fstab entry “/dev/sda4 (device) media/data (mount point)
ext4 (partition type) defaults 0 0”
This is to get the mounted partition on the desktop at boot.
It works and I have already moved some files and have made my 1s
timeshift bkup.
Linux can just be full of surprises!!!

I thought for a gpt partitioned disk one should use cgdisk or gdisk rather than cfdisk or fdisk

I am surprised gparted did not work. It has always worked for me.
What are these permission issues? Permissions apply to files, not to partitions or filesystems

neville

Could you explain why it did not work?

@nevj
It is not GPT but MBR.

1 Like

@Akito
@nevj
It was more than likely something I was not getting right, in why gparted did not work, but at about 1:30AM I gave up and went to bed. I will say it was more about ownership, wr permission, and a proper mount point.
I had issues like this before, while running Gentoo, so I drug out my big notepad, and was lucky enough to find the chown and chmod commands in my notes.
Just thought I would share this info in case someone else is in need.


Ownership has been changed from root to daniel/user. Have no idea what all the
letters stand, but I be @Akito knows.

drwxrwxrwx
d means it is a directory
first rwx are read write and execute permissions for owner
second rwx ditto for group
third rwx ditto for everyone

So anyone can write in /media/data

And, yes i can see what you mean. Whoever makes the mount point owns it. Noone owns the partition.

My compile of librewolf is still failing. About to give up. It is just a modified firefox. Waterfox looks like it for now.
Neville

So you write notes, like me… It is a good habit when doing system changes.

1 Like

@nevj
I have so many notes that it would make Einstein envious

DSCN0746-S
This is the old PC that I have reconfigured around PClinux. This PC was built back in the late
90’s around a Intel DP43BF mobo and a Intel Pentium E6700 3.20GHz CPU, and it is still running,and
has been reconfigured many times.
#1 The top HDD 500GB is the boot drive with PCLinux installed.
#2 The next drive is a 1tb drive with XP install in the 1st 130GB partition, it has three more partition
dedicated for bkup and data.
#3 A 240GB SanDisk SSD that is running Windows 8.1.
#4 A 120GB SanDisk SSD that is running Windows 10.
And now it is about time to button this baby up and let it run for awhile. Will start work on my main
PC soon.

@4dandl4
I had one of those only a bit older… a 486 with a vesa localbus, built in early 1990’s. It ran FreeBSD for about 20 years. It had external disks and a quiktape drive and a cd reader , all on a scsi card. I threw it out about 5 years ago. My last machine that would read floppy disks.

Maybe you should publish your notes.

Given up on compiling LibreWolf. Failure.

Neville


Correct me if I am wrong!!! When running a Linux like PCLinux, that does not use sudo, that all folders in the home dir is owned by root? I say this because I uploaded some jpg photos from my Nikon camera, and was denied permission to open them, un less I used, open as administrator.
So to gain ownership of my home dir I ran this command while in root "chown -v -R daniel:daniel /home/daniel/
I now have ownership of my home dir.

This is one of the major problems when logging into root. It’s one of the many reasons, why I do not recommend logging in as the root user, except you are a professional or at least very experienced Linux user/administrator.

If you are logged in as root user, everything you do, counts as being done by the root user. Creating a new file? It’s owned by root now. Changing certain files? May be owned by root now, depending on the situation.
Running programs which depend on which user runs it, may cause problems, too. For example, you also cannot use the ~ shortcut anymore, as this would expand to /root, while you are logged in as the root user.

Reasons like this show, that being logged in as the root user is no child’s play. You have to know what you are doing plus you have to be very careful, before doing anything. Any rm might delete important files, backups or your entire file system.

So, in your situation, you probably ran commands which, for example, created new files in your actual home folder and then you cannot access them with your normal account, as root created them.

Be careful, when using root. Using sudo is usually much safer for not so experienced Linux users, as you explicitly have to state it for each command you execute.

You might also need chgrp
Beware of what @Akito says about being logged in as root.
It is OK but you do have to be careful.
Dont start (ie login to) the window system as root. Login as a user, then su in one window to root, when you need to. That would have saved you the camera file problem.

Neville

@nevj
I do login as user daniel, but since there is no sudo in pclinux, then the command had
to be ran in the root terminal. I see no need in having a /home dir, if I have no permission
to run my files. Root may own the /home dir, but I at least can access my data. The photos
belonged to me not root.

I think root owns /home, but within that I think the daniel subdir should be owned by daniel.

To me no sudo is not an issue. You just use su and give the root password. That is all a PC needs. A multiuser computer is different, it needs sudo if there is more than one administrator or if they want users to be able to do a restriced range of things , like mounts for example,

Solus is weird. There is no su access to root. There is sudo, and there is a workaround where you do sudo su
and give the user password and you become root ?

Neville

1 Like

@nevj
That makes sense and evidently root owned the daniel subdir, until chown was ran
for ownership.

And that is exactly what I do.

1 Like

You should never have to sign in as root to access your home dir folders.
PClinuxOS is old school and does not use sudo but the su command to acess root priviledges. Though sudo can be installed and used it should not be needed in most cases. There has been a great debate about which is safe sudo vs su but it’s not needed to go into all that here.
Here is how to add sudo to PCLinuxOS if you want.
Go to synaptic and install sudo

Edit /etc/sudoers file and add your name
root ALL=(ALL) ALL
(your user name) ALL=(ALL) ALL (note: user name without the ()
save
sudo will then work with that user.

That’s incorrect. /home should be owned by root. This is always the case in a standard installation. Each folder inside /home should be owned by whoever’s home it is. /home/daniel should therefore be owned by daniel, /home/linuxfan should be owned by linuxfan, etc…

You deleted that part, while I was writing this post.

Great debate? What debate? su is unsafer, for most users, who are inexperienced, because it is easier to make mistakes, when logged in as root the entire time.

I’m not sure if that is the correct usage. I think this is going too far. However, I would need to look up the exact semantics.

You are too quick I modified the post. And that is the correct proceedure in PCLinuxOS for adding sudo. I’ve done it many times in PCLinuxOS. You may prefer sudo over su and and there are just as many on the other side.

sudo v su commands

I would tend to agree with you that in most instances sudo is a safer bet for the new user. But PCLinuxOS has chosen not to use it by default. And if you want to use it , it must be install and configured.
Cheers!

I personally log in as root all the time, because I know what I am doing and rarely do a mistake. I am used to it. However, I would not recommend it to anyone who doesn’t feel very comfortable and experienced on the Linux command line.

@kc1di

If I wanted sudo I would have installed, something like Debian. PCLinux has given me, the user,
a choice, do not really care about whether I should or should not.
@Akito

A Window user wants to migrate to Linux. The Windows user just logs in with either a PW or
a Pin. The user installs Linux logs in and now the user has sudo to deal with and having to
enter a PW to do things that Windows can do without a PW.
Linux is at times it’s own worst enemy. You want Linux to grow?
PCLinux gives a potential, Windows user, the ability to do that, by not
making sudo default, as in other distros.
Like it or not most users just wants to login to their PC, and not keep entering
passwords, that have already been entered.