UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Strange permissions on /etc /usr with uid 1005 and gid 1006

    Scheduled Pinned Locked Moved Solved Support
    18 Posts 4 Posters 2.6k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      pelenze
      last edited by pelenze

      I see some bad permission on some system dir

      / instead of root 755 is 1005:1006 with 775 permission
      /usr and /etc the same.

      I have fixed it restoring the correct Linux permission

      sudo chmod 755 /etc
      sudo chmod 755 /etc/init
      sudo chmod 755 /etc/wifi
      sudo chmod 644 /etc/wifi/bcmdhd.cal
      sudo chmod 755 /var
      sudo chmod 755 /var/lib
      sudo chmod 755 /var/lib/lxc
      sudo chmod 755 /var/lib/lxc/android
      sudo chmod 644 /var/lib/lxc/android/rootfs/cache/legacy_channel
      sudo chmod 770 /var/lib/lxc/android/rootfs/data/misc/audio
      sudo chmod 755 /android/cache/legacy_channel
      sudo chmod 770 /android/data/misc/audio
      sudo chmod 755 /usr
      sudo chmod 755 /usr/bin
      sudo chmod 644 /usr/bin/.system-image-keep
      sudo chmod 755 /usr/share
      sudo chmod 755 /usr/share/bluetooth-touch
      sudo chmod 644 /usr/share/bluetooth-touch/hammerhead
      sudo chmod 644 /usr/share/system-image/archive-master.tar.xz
      sudo chmod 644 /usr/share/system-image/archive-master.tar.xz.asc
      sudo chmod 770 /userdata/android-data/misc/audio
      sudo chown root:root /etc
      sudo chown root:root /etc/init
      sudo chown root:root /etc/wifi
      sudo chown root:root /etc/wifi/bcmdhd.cal
      sudo chown root:root /var
      sudo chown root:root /var/lib
      sudo chown root:root /var/lib/lxc
      sudo chown root:root /var/lib/lxc/android
      sudo chown root:root /var/lib/lxc/android/rootfs/cache/legacy_channel
      sudo chown root:audio /var/lib/lxc/android/rootfs/data/misc/audio
      sudo chown root:root /android/cache/legacy_channel
      sudo chown root:audio /android/data/misc/audio
      sudo chown root:root /usr
      sudo chown root:root /usr/bin
      sudo chown root:root /usr/bin/.system-image-keep
      sudo chown root:root /usr/share
      sudo chown root:root /usr/share/bluetooth-touch
      sudo chown root:root /usr/share/bluetooth-touch/hammerhead
      sudo chown root:root /usr/share/system-image/archive-master.tar.xz
      sudo chown root:root /usr/share/system-image/archive-master.tar.xz.asc
      sudo chown root:audio /userdata/android-data/misc/audio
      

      I see there are a lot of files with gid 1006 under android dir

      /var/lib/lxc/android/system.img
      /var/lib/lxc/android/rootfs/dev/video35
      /var/lib/lxc/android/rootfs/dev/video34
      /var/lib/lxc/android/rootfs/dev/video33
      /var/lib/lxc/android/rootfs/dev/video32
      /var/lib/lxc/android/rootfs/dev/jpeg2
      /var/lib/lxc/android/rootfs/dev/jpeg1
      /var/lib/lxc/android/rootfs/dev/jpeg0
      /var/lib/lxc/android/rootfs/dev/video1
      /var/lib/lxc/android/rootfs/dev/media1
      /var/lib/lxc/android/rootfs/dev/video2
      /var/lib/lxc/android/rootfs/dev/media2
      /var/lib/lxc/android/rootfs/dev/video0
      /var/lib/lxc/android/rootfs/dev/v4l-subdev9
      /var/lib/lxc/android/rootfs/dev/v4l-subdev8
      /var/lib/lxc/android/rootfs/dev/v4l-subdev7
      /var/lib/lxc/android/rootfs/dev/v4l-subdev6
      /var/lib/lxc/android/rootfs/dev/v4l-subdev5
      /var/lib/lxc/android/rootfs/dev/v4l-subdev4
      /var/lib/lxc/android/rootfs/dev/v4l-subdev3
      /var/lib/lxc/android/rootfs/dev/v4l-subdev2
      /var/lib/lxc/android/rootfs/dev/v4l-subdev1
      /var/lib/lxc/android/rootfs/dev/v4l-subdev0
      /var/lib/lxc/android/rootfs/dev/v4l-subdev17
      /var/lib/lxc/android/rootfs/dev/v4l-subdev16
      /var/lib/lxc/android/rootfs/dev/v4l-subdev15
      /var/lib/lxc/android/rootfs/dev/v4l-subdev14
      /var/lib/lxc/android/rootfs/dev/v4l-subdev13
      /var/lib/lxc/android/rootfs/dev/v4l-subdev12
      /var/lib/lxc/android/rootfs/dev/v4l-subdev11
      /var/lib/lxc/android/rootfs/dev/v4l-subdev10
      /var/lib/lxc/android/rootfs/dev/media0
      /var/lib/lxc/android/rootfs/data/cam_socket1
      /var/lib/lxc/android/rootfs/data/cam_socket2
      /var/lib/lxc/android/rootfs/data/fdAlbum
      /android/data/cam_socket1
      /android/data/cam_socket2
      /android/data/fdAlbum
      /userdata/android-data/cam_socket1
      /userdata/android-data/cam_socket2
      /userdata/android-data/fdAlbum
      
      

      I prefer to not touch those dirs, I have made a mistake to change the permissions on / and /usr ?

      KenedaK 1 Reply Last reply Reply Quote 1
      • flohackF Offline
        flohack
        last edited by

        Please do not change any permissions at all, that can harm access from the Android container to certain files. Especially do not touch anything in lxc folder, this can harm the underlying Android container and so your device wont boot eventually.

        My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

        1 Reply Last reply Reply Quote 1
        • KenedaK Offline
          Keneda @pelenze
          last edited by Keneda

          @pelenze
          Ubuntu Touch is not a regular GNU/L distrib.
          It's designed for smartphones and mobile devices (android native one at first), with system files read only and some other particularities.
          This for user security reasons (this OS is for any users, like me, not only power linux users).

          2015-2023 : Meizu MX4 ☠️⚰️✝️
          2023-2024 : Nexus 5 ☠️⚰️✝️
          2024-***** : FPOS Fairphone 5
          πŸ‡²πŸ‡«πŸ‡¬πŸ‡§

          P 1 Reply Last reply Reply Quote 0
          • P Offline
            pelenze @Keneda
            last edited by

            @keneda said in Strange permissions on /etc /usr with uid 1005 and gid 1006:

            @pelenze
            Ubuntu Touch is not a regular GNU/L distrib.
            It's designed for smartphones and mobile devices (android native one at first), with system files read only and some other particularities.
            This for user security reasons (this OS is for any users, like me, not only power linux users).

            So is better to restore the old perms?

            KenedaK 1 Reply Last reply Reply Quote 0
            • KenedaK Offline
              Keneda @pelenze
              last edited by

              @pelenze
              Like said @Flohack yes it would be better.

              2015-2023 : Meizu MX4 ☠️⚰️✝️
              2023-2024 : Nexus 5 ☠️⚰️✝️
              2024-***** : FPOS Fairphone 5
              πŸ‡²πŸ‡«πŸ‡¬πŸ‡§

              1 Reply Last reply Reply Quote 0
              • P Offline
                pelenze
                last edited by pelenze

                Thanks, I mark the thread solved
                I'm lucky that i had a backup made with rsync so I had the correct permissions to restore
                Just another question: is possible to download somewhere the system.img untouched for Ubuntu touch for Nexus5?

                KenedaK flohackF 2 Replies Last reply Reply Quote 0
                • P pelenze has marked this topic as solved on
                • KenedaK Offline
                  Keneda @pelenze
                  last edited by Keneda

                  @pelenze
                  You can use ubports installer any time to reinstall your N5.
                  When doing so, you can choose to keep user data, or erase it, by ticking or not the "wipe user data" (or so) option.

                  There is a way to retrieve "img" files for your device in the process, but can't tell how exactly (stored in a temp folder).

                  But not really necessary as ubports installer is the way to install on N5.

                  You can also retrieve "raw" files on ubports git, but then you'll need to compile (is this the right word?) those.

                  2015-2023 : Meizu MX4 ☠️⚰️✝️
                  2023-2024 : Nexus 5 ☠️⚰️✝️
                  2024-***** : FPOS Fairphone 5
                  πŸ‡²πŸ‡«πŸ‡¬πŸ‡§

                  1 Reply Last reply Reply Quote 0
                  • flohackF Offline
                    flohack @pelenze
                    last edited by

                    @pelenze Yeah I would not bother with manual steps, just reinstall. All data is saved, if you do not check the wipe option. We use readonly rootfs for a reason, so that we can quickly exchange it. Also its nice to have it against any malicious attacks that otherwise could render your device unbootable

                    My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                    1 Reply Last reply Reply Quote 0
                    • Pulsar33P Offline
                      Pulsar33
                      last edited by

                      I understand your advice to be careful but on my BQ E5 OTA-22 I notice that most of the folders in / are 755 root root. It is the same for /var/lib/lxc/android
                      Why should it be different on N5?
                      BR
                      Pulsar33

                      Aquaris BQ E5 HD UBports OTA-25 (currently testing features)
                      Aquaris BQ E5 HD Ubuntu Edition Canonical OTA-15 (last Canonical version, daily use)
                      Raspberry Pi 4 B - 4 GB & 8 GB with various OS and Desktops (UBports not OK)

                      flohackF 1 Reply Last reply Reply Quote 0
                      • flohackF Offline
                        flohack @Pulsar33
                        last edited by

                        @pulsar33 Because we use different builders for the root files system since Halium 9 I think πŸ™‚

                        My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                        Pulsar33P 1 Reply Last reply Reply Quote 0
                        • Pulsar33P Offline
                          Pulsar33 @flohack
                          last edited by

                          @flohack said in Strange permissions on /etc /usr with uid 1005 and gid 1006:

                          I think πŸ™‚

                          Well, if you're not sure ...
                          Unfortunately, I've not the knowledge to check this myself :crying_face:
                          Thanks for the ansewer, anyway
                          BR
                          Pulsar33

                          Aquaris BQ E5 HD UBports OTA-25 (currently testing features)
                          Aquaris BQ E5 HD Ubuntu Edition Canonical OTA-15 (last Canonical version, daily use)
                          Raspberry Pi 4 B - 4 GB & 8 GB with various OS and Desktops (UBports not OK)

                          1 Reply Last reply Reply Quote 0
                          • P Offline
                            pelenze
                            last edited by

                            There is no need to reinstall, I had restored original perms copying them from the backup files(thanks rsync).
                            Only one question: on your phones this file exist?

                            /android/cache/legacy_channel
                            
                            KenedaK flohackF 2 Replies Last reply Reply Quote 0
                            • KenedaK Offline
                              Keneda @pelenze
                              last edited by Keneda

                              @pelenze
                              Not on my MX4
                              screenshot20220224_205611531.png

                              Edit :
                              Neither on my N5
                              image20220224_210132462.jpg

                              2015-2023 : Meizu MX4 ☠️⚰️✝️
                              2023-2024 : Nexus 5 ☠️⚰️✝️
                              2024-***** : FPOS Fairphone 5
                              πŸ‡²πŸ‡«πŸ‡¬πŸ‡§

                              P 1 Reply Last reply Reply Quote 0
                              • P Offline
                                pelenze @Keneda
                                last edited by

                                @keneda
                                Thanks

                                1 Reply Last reply Reply Quote 0
                                • flohackF Offline
                                  flohack @pelenze
                                  last edited by

                                  @pelenze Please keep that, its a flag that you are on an older device that needs special treatment during upgrades. Removing this can brick your device when you are switching between channels or if we update to a newer Halium version.

                                  My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                                  P KenedaK 2 Replies Last reply Reply Quote 0
                                  • P Offline
                                    pelenze @flohack
                                    last edited by

                                    @flohack
                                    Thanks I will not remove, but I notice after change permission the first time that the file was removed..and not by me(probably an upgrade).
                                    I have restored it from backup and give it the right permissions.

                                    1 Reply Last reply Reply Quote 0
                                    • KenedaK Offline
                                      Keneda @flohack
                                      last edited by Keneda

                                      @flohack
                                      What ?
                                      Should i have this file on MX4 or N5 ?
                                      I did not remove any file.

                                      2015-2023 : Meizu MX4 ☠️⚰️✝️
                                      2023-2024 : Nexus 5 ☠️⚰️✝️
                                      2024-***** : FPOS Fairphone 5
                                      πŸ‡²πŸ‡«πŸ‡¬πŸ‡§

                                      Pulsar33P 1 Reply Last reply Reply Quote 0
                                      • Pulsar33P Offline
                                        Pulsar33 @Keneda
                                        last edited by

                                        @keneda said in Strange permissions on /etc /usr with uid 1005 and gid 1006:

                                        @flohack
                                        What ?
                                        Should i have this file on MX4 or N5 ?
                                        I did not remove any file.

                                        Same for me on BQ E5
                                        BR
                                        Pulsar33

                                        Aquaris BQ E5 HD UBports OTA-25 (currently testing features)
                                        Aquaris BQ E5 HD Ubuntu Edition Canonical OTA-15 (last Canonical version, daily use)
                                        Raspberry Pi 4 B - 4 GB & 8 GB with various OS and Desktops (UBports not OK)

                                        1 Reply Last reply Reply Quote 0

                                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                        With your input, this post could be even better πŸ’—

                                        Register Login
                                        • First post
                                          Last post