Installation sudo chown -R pi:pi .

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
gerard1
Posts: 26
Joined: Tuesday 25 December 2018 13:54
Target OS: Linux
Domoticz version:
Contact:

Installation sudo chown -R pi:pi .

Post by gerard1 »

ZigBeeForDomoticZ plugin installation
The installation is written for a Raspberry pi.
However I am using a Chinese NUC with Ubuntu.
The command sudo chown -R pi:pi . should be different when you have your a Ubuntu installation.
Could some one explain how to change this line for a Ubuntu installation.
Thanks,
lost
Posts: 660
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Installation sudo chown -R pi:pi .

Post by lost »

gerard1 wrote: Monday 22 January 2024 10:10 The command sudo chown -R pi:pi . should be different when you have your a Ubuntu installation.
Could some one explain how to change this line for a Ubuntu installation.
pi is raspberries default account user name (and group). Either change it for the account used for domoticz ('whoami' command will tell your current user name) installation or, from the right account/directory (take care -R is for recursive!), use:

Code: Select all

sudo chown -R $(whoami):$(whoami) .
HvdW
Posts: 612
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Installation sudo chown -R pi:pi .

Post by HvdW »

What is the . (dot) for?
Bugs bug me.
Kedi
Posts: 575
Joined: Monday 20 March 2023 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Somewhere in NL
Contact:

Re: Installation sudo chown -R pi:pi .

Post by Kedi »

Current directory and the -R is everything below that.
Logic will get you from A to B. Imagination will take you everywhere.
lost
Posts: 660
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Installation sudo chown -R pi:pi .

Post by lost »

HvdW wrote: Monday 22 January 2024 12:12 What is the . (dot) for?
3 importants characteristics of unices file trees are:
-Being single rooted, thus no drive letters (firsts for floppies no more use) as windows (a:, b:, c: etc) used natively (if using cygwin, posix compatibility layer for windows that brings many Linux/Unix tools/shells etc, it brings some compatibility making a single root named /cygdrive, so c: becomes /cygdrive/c for instance).
-Current directory is .
-Parent directory is .. (exception for root directory or a mount point, where .. points to itself so same as .), that keeps the needed tree link, here are first 2 inodes of my system root:

Code: Select all

ls -ai / | head -n 2
      2 .
      2 ..
=> same inode = 2

For my current account home directory:

Code: Select all

ls -ai ~ | head -n 2
16384001 .
       2 ..
Different inodes nb for . and .. here, that's correct as it's not a root. But you can see parent .. is also inode 2: Same as / but why? Let's see /home under /home/MY_USERNAME:

Code: Select all

ls -ai /home | head -n 2
       2 .
       2 ..
Home is not my system root, but a mount point (so same situation, that's another FS so same inode allocation starting from it's own root) as I always use separate partition for /home when installing a Linux/Unix machine (better if full OS re-installation someday needed: I can completely screw / system partition and keep /home intact, not re-format done by installer).

File that declares mounts to be done at boot confirms (that's now UUID instead of /dev/sdX to identify partitions but there is still installer comments):

Code: Select all

grep /dev/sd /etc/fstab 
# / was on /dev/sda2 during installation
# /boot/efi was on /dev/sda1 during installation
# /home was on /dev/sda4 during installation

=> / is on second drive partition (1st is the mandatory one since UEFI replaced legacy BIOSes, as I show this from a Linux PC and not my PI) ; /home on 4th partition thus not directly inside / as it would be if followed Debian installer defaults.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest