[SOLVED] frugal install 32-bit antiX

Forum Forums New users New Users and General Questions [SOLVED] frugal install 32-bit antiX

  • This topic has 153 replies, 10 voices, and was last updated May 5-10:25 pm by Brian Masinick.
Viewing 15 posts - 136 through 150 (of 154 total)
  • Author
    Posts
  • #82328
    Member
    Robin
      Helpful
      Up
      0
      ::

      The directory is on a large ext3 data partition, logical drive sda2

      1.) Possibly your drive was mounted a way you can’t write to it as default user.
      check the output of

      mount | grep /dev/sda2

      on a RoxTerm virtual console window and let us see the output. Possibly it is mounted in a way only root can write to it.

      2.) Another possibility is the permissions of the parent folder are not set correctly.
      Please move up in file system structure, so you see the folder you are trying to create the file in as an icon.

      Right-click in this icon and select “Properties“. Please let us know, who is the owner, what group is it assigned to, and what permissions are displayed to be set for this folder.

      Setting these things straight should fix your issues.

      Windows is like a submarine. Open a window and serious problems will start.

      #82330
      Moderator
      Brian Masinick
        Helpful
        Up
        0
        ::

        The directory, and therefore the file, is not on /home. The directory is on a large ext3 data partition, logical drive sda2, created with Gparted. I’d say the directory has been in existence for 10 years. The test geany file was created today.

        IF you are the actual owner of this file and it’s not something shared on a multi-user computer, it’s possible to change the owner of the directory, regardless of it’s age, as long as it’s not read-only media. Since you did create a new file on it, it’s not read only, but it’s not owned by your usual account, and that’s why you have to use root. Another option is to create a new directory on that media and make at least that particular directory owned by an “ordinary user” (presumably you).

        Are either of these things reasonable and possible options or is this a shared drive?

        --
        Brian Masinick

        #82332
        Member
        dugin
          Helpful
          Up
          0
          ::
          demo@antix1:~
          $ mount | grep dev/sda2
          /dev/sda2 on /media/sda2 type ext3 (rw,nosuid,nodev,noexec,relatime,data=ordered)
          
          
          • This reply was modified 1 year ago by dugin.
          • This reply was modified 1 year ago by dugin.
          • This reply was modified 1 year ago by dugin.
          #82333
          Member
          PPC
            Helpful
            Up
            0
            ::

            @dugin – you can use your convoluted system (from your original post, before the your edits) or you can be proactive and try to search for a way to solve your problem- so this is my last try: I did a on-line search for the exact problem you have- on duckduckgo I searched “changing write permitions of partition ext3” – the first hit was this: “How To Solve: Cannot Write to Ext3 or Ext4 Partition” ( https://itsfoss.com/solve-cannot-write-ext3-ext4-partition/ ).
            You can:
            1- give up on Linux antiX and use another operating system that works for you;
            2- keep doing things in a very convoluted way;
            3- you can try to fix your user’s permitions for that partition;
            4- you can find any other way to work around that.

            … any solution you choose is ok by me 🙂

            P.

            Edit: I must be getting slow in my “old age”- the time it took me to do a web search, read the result of my query and write this post, this thread got 2 more posts…

            • This reply was modified 1 year ago by PPC.
            #82337
            Member
            Robin
              Helpful
              Up
              0
              ::

              1.) The output of mount command you’ve posted looks fine to me. Your partition is mounted read write (you see the rw flag in the line; in case it was only readable this would have been an r instead)

              Do all the files and folders on this external drive belong to you? Is it a data vault only, or does the partition contain an operating system also (in this case you need to be way more carefully when taking over the ownership.)

              2.) Old folders when created by another old linux system tend to have set different ownership (user-id) to the folders. You can set this straight simply by using the chown command on console with its recursive option. Then the ownership of all the folders and files will be set to the desired user.

              sudo chown -R user:group /media/sda2/

              Don’t forget to replace user and group both by your actual user name, separated by a colon (e.g. demo:demo ).

              But let me emphasise Brians restriction:

              IF you are the actual owner of this file and it’s not something shared on a multi-user computer,

              Only do this in case you are actualy sure there is nothing stored on it which doesn’t belong to you or is needed to keep its root ownership.

              Windows is like a submarine. Open a window and serious problems will start.

              #82339
              Member
              dugin
                Helpful
                Up
                0
                ::

                No OS or frugal save files on sda2, but many ISO files, naturally. I don’t mind doing all my editing in ROX as root, because it makes sense to me. The directory I wish to edit has been transferred to another hard drive several times, as a hard drive fails or is replaced by a larger hdd. I’ve noticed that the permissions for the directory cannot be changed (persistently) with ROX as root, and the permission is currently set to “a+x (Make excecutable/seachable)”. If possible I want to keep the owner as root, not user, and perhaps I need to change permissions from terminal to make ‘u+rw (Give owner read & write)’ persistent.
                ‘ls -l’ for the directory shows ‘drwxr-xr-x 2 root root 4096 Apr 27 18:52 Index’.

                EDIT: I’m guessing that Permissions revert to a+x by default, after the permission changes are set and confirmed. If I could figure out why ROX as root won’t open the geany file, that info would go a long way to understanding the problem, and/or finding a good workaround. I have to be careful about changing the entire sda2 drive, because the data is in TBs.

                • This reply was modified 1 year ago by dugin.
                • This reply was modified 1 year ago by dugin.
                • This reply was modified 1 year ago by dugin.
                #82351
                Member
                dugin
                  Helpful
                  Up
                  0
                  ::

                  I opened ROXterm, changed user to root, navigated to /media/sda2, called rox (as root) to display contents of Index directory, mouse-clicked text file displayed in ROX to open with geany (no response, failed), cd Index, used terminal to call geany to open old text file. It opened in geany, I successfully edited the text file, and Saved. No error messages occurred. I don’t propose this as a procedure, but the events may say something about the gui. Or may not, it’s just a possibility. For example, here’s a possible interpretation: When ROX displays the contents of the directory, it hasn’t actually cd’ed into the directory where it has root privileges, so some functions don’t work.

                  I repeated the sequence, making sure that I mounted sda2 with ROX-as-root gui. I was able to edit the text file displayed in ROX (as root from terminal), but there was an error message in terminal:

                  root@antix1:/media/sda2# rox Index
                  root@antix1:/media/sda2# head: cannot open '/root/.desktop-session/desktop-code.' for reading: No such file or directory
                  

                  On the other hand, this sequence produced a ROX gui that wouldn’t open a text file in geany

                  demo@antix1:~
                  $ sudo su
                  root@antix1:/home/demo# cd /media/sda2
                  root@antix1:/media/sda2# mount /media/sda2
                  root@antix1:/media/sda2# rox Index
                  root@antix1:/media/sda2# 
                  

                  However, if I open the media directory, sda2 does not have an illuminated green dot, but terminal still sees sda2 as mounted (or busy).

                  Summarizing, if I mount /media/sda2 with ROX-as-root gui, I can open a text file in geany for editing, with error. But, it may be a one-off editing session because terminal becomes unavailable after error message.

                  • This reply was modified 1 year ago by dugin.
                  • This reply was modified 1 year ago by dugin.
                  • This reply was modified 1 year ago by dugin.
                  #82379
                  Member
                  Robin
                    Helpful
                    Up
                    0
                    ::

                    that info would go a long way to understanding the problem, and/or finding a good workaround.

                    So try to catch the error. You followed the right path already, starting the thing in a terminal window. You said, rox blocks the terminal once started from it, so try add an & to the command starting rox in console, to let it run as a coproces.

                    Moreover, did you notice RoxFiler comes with a log console? You can live see whether the change of permissions was actually performed.
                    Right-click, from Context Menu choose “Window → Show Log”.

                    Then change the permissions of a folder or file, don’t forget to press “Actualise” once you have set the checkboxes as you want them. The file change date in the properties window of the file should change immediately to the actual time and date values, and there should be an entry in the log: Change permissions /path/to/file

                    A second and more sophisticated way to change the permissions in Roxfiler is to chose “permissions” from context menu (instead of properties). There you get a field to chose the permission changes in symbolic mode from a predefined list, but you can enter them simply manually there, Symbolic and Numeric styls both (e.g. 755, or all other variants chmod understands)

                    Check what the Log console tells you once you change permission of files and folders.

                    For testing (wanted to explore the new RoxFiler anyway) I have set up a folder the same way as you described, having it stored on an external drive (USB plugged external hdd, but it is ext4 format, shouldn’t make a difference here), mounted with the very flags and permissions you have posted in your command line output of the mount command. Then I’ve created a new folder on it, changed the ownership of this folder to “root:root” on console using chown, and changed also the permission to 755 just like your folder is set (drwxr-xr-x). Then I started »roxfiler as root« from antiX menu, entered the folder and was perfectly able to create a new file »new-testfile-owned-by-root« within this folder, simply by right clicking and chosing »new → empty file« from context menu. Then, again from context menu, after clicking this file, choosing “open with geany”, a second instance of geany comes up (since I have running a first one by the true user account already), the new geany instance was started in root context obviously, since I can edit the file, and save it without any error. I can’t reproduce the problem you describe.

                    So probably best would be: check the internal log console of rox filer as described in the beginning. Maybe there you’ll find something useful for tracing down the issue.

                    Windows is like a submarine. Open a window and serious problems will start.

                    #82382
                    Member
                    dugin
                      Helpful
                      Up
                      0
                      ::

                      I repeated the sequence, making sure that I mounted sda2 with ROX-as-root gui. I was able to edit the text file displayed in ROX (as root from terminal), but there was an error message in terminal:

                      root@antix1:/media/sda2# rox Index
                      root@antix1:/media/sda2# head: cannot open '/root/.desktop-session/desktop-code.' for reading: No such file or directory
                      

                      There’s the error message when I mount sda2 with rox-as-root gui. What does it mean? Apparently, ROX expects to find home/demo hidden files in /root, but those hidden files are not in /root. (When I mount sda2 with plain rox gui, then run the sequence of commands, I get a scanning error, can’t stat directory.)

                      When I tried to open text file displayed in ROX-as-root, there was no response to my mouse-click, and ROX showed no log of the action.

                      • This reply was modified 1 year ago by dugin.
                      • This reply was modified 1 year ago by dugin.
                      • This reply was modified 1 year ago by dugin.
                      #82386
                      Member
                      dugin
                        Helpful
                        Up
                        0
                        ::

                        Opening a text file in geany isn’t the only thing I can’t do when using ROX-as-root. I can’t play a media file using ROX-as-root. I click on the AV file, nothing happens, no response. What the geany files and the AV files have in common is they all reside on the ext3 data partition.

                        demo@antix1:~
                        $ sudo su
                        [sudo] password for demo: 
                        root@antix1:/home/demo# cd /media/sda2
                        root@antix1:/media/sda2# rox movies
                        root@antix1:/media/sda2# VLC is not supposed to be run as root. Sorry.
                        If you need to use real-time priorities and/or privileged TCP ports
                        you can use vlc-wrapper (make sure it is Set-UID root and
                        cannot be run by non-trusted users first).
                        

                        Does mpv give the same error?

                        Here’s a curiosity. When I mount /media/sda2 from terminal then list contents, I get the directories in home/demo.

                        demo@antix1:~
                        $ sudo su
                        root@antix1:/home/demo# mount /media/sda2
                        root@antix1:/home/demo# ls
                        Desktop  Documents  Downloads  Music  Pictures	Videos
                        root@antix1:/home/demo# cd /media
                        root@antix1:/media# ls
                        ANTIX-UEFI  sda1  sda2	sdb1  sr0
                        root@antix1:/media# mount sda2
                        mount: /media/sda2: /dev/sda2 already mounted on /media/sda2.
                        root@antix1:/media# 
                        

                        Is this difficulty because I am working with mounting points, rather than devices themselves? After running this in terminal, I used rox gui to check to see if sda2 is mounted. Result: there is no green dot indicating that sda2 is mounted, that is, sda2 is not mounted. So what am I really doing when I mount sda2 with rox-as-root gui, am I mounting a mounting point? And does this mounting point actually belong to home/demo? When I ‘sudo su’, why does root still show home/demo, as in ‘root@antix1:/home/demo# _’?

                        This doesn’t work

                        demo@antix1:~
                        $ sudo su
                        root@antix1:/home/demo# cd /
                        root@antix1:/# mount /media/sda2
                        root@antix1:/# rox Index
                        root@antix1:/# cd media
                        root@antix1:/media# cd sda2
                        root@antix1:/media/sda2# rox Index
                        root@antix1:/media/sda2# 
                        

                        This doesn’t work

                        demo@antix1:~
                        $ cd /
                        demo@antix1:/
                        $ ls
                        bin   dev  home  lib32  libx32  media  opt   pulse  run   srv  tmp  var
                        boot  etc  lib   lib64  live    mnt    proc  root   sbin  sys  usr
                        demo@antix1:/
                        $ cd media
                        demo@antix1:/media
                        $ ls
                        ANTIX-UEFI  sda1  sda2  sdb1  sr0
                        demo@antix1:/media
                        $ cd sda2
                        demo@antix1:/media/sda2
                        $ sudo su
                        root@antix1:/media/sda2# rox Index
                        root@antix1:/media/sda2# 
                        

                        I guess mounting logical drives from terminal is futile

                        demo@antix1:~
                        $ sudo su
                        root@antix1:/home/demo# cd /
                        root@antix1:/# mount /media/sda2
                        root@antix1:/# ls
                        bin   dev  home  lib32	libx32	media  opt   pulse  run   srv  tmp  var
                        boot  etc  lib	 lib64	live	mnt    proc  root   sbin  sys  usr
                        root@antix1:/# 
                        

                        same difference

                        demo@antix1:~
                        $ sudo su
                        root@antix1:/home/demo# cd /
                        root@antix1:/# ls
                        bin   dev  home  lib32	libx32	media  opt   pulse  run   srv  tmp  var
                        boot  etc  lib	 lib64	live	mnt    proc  root   sbin  sys  usr
                        root@antix1:/# cd media
                        root@antix1:/media# ls
                        ANTIX-UEFI  sda1  sda2	sdb1  sr0
                        root@antix1:/media# mount sda2
                        mount: /media/sda2: /dev/sda2 already mounted on /media/sda2.
                        root@antix1:/media# 
                        
                        • This reply was modified 1 year ago by dugin.
                        • This reply was modified 1 year ago by dugin.
                        • This reply was modified 1 year ago by dugin.
                        #82419
                        Member
                        dugin
                          Helpful
                          Up
                          0
                          ::

                          So basically, here’s my practical procedure to edit text file(s) in the Index directory
                          1. mount sda2 with rox-as-root gui
                          2. open Roxterm, change user to root (with home/demo pathname)
                          3. cd to /media/sda2/Index
                          4. ls to view text files
                          5. geany [text file], edit and save

                          Alternatively, SpaceFM lets me edit as root, without complaint, without error. SpaceFM also mounts and unmounts logical drives coherently.

                          • This reply was modified 1 year ago by dugin.
                          • This reply was modified 1 year ago by dugin.
                          • This reply was modified 1 year ago by dugin.
                          #82463
                          Moderator
                          christophe
                            Helpful
                            Up
                            1
                            ::

                            demo@antix1:~
                            $ sudo apt install xfburn
                            Reading package lists… Done
                            Building dependency tree… Done
                            Reading state information… Done
                            E: Unable to locate package xfburn
                            demo@antix1:~

                            Run
                            sudo apt update
                            first, before the command
                            sudo apt install xfburn

                            This is required after a remaster – the remaster does not save “junk” information that you won’t want to keep for any length of time. Because the apt update would need to be performed often, to make sure your system has the most accurate information, it is omitted by default. This apt update is one of those things that synaptic or the package installer do “behind the scenes” for you. 🙂

                            confirmed antiX frugaler, since 2019

                            #82464
                            Member
                            Robin
                              Helpful
                              Up
                              1
                              ::

                              Is this difficulty because I am working with mounting points, rather than devices themselves?

                              Yes and No. You are supposed to work on mountpoints always, never with the devices found in /dev directly, when it’s about accessing files stored on a device. But yes, in order to manually mount a device you are supposed to mount it directly from its device name present in /dev to a mountpoint (which is actually a simple ordinary empty folder). But the mount command is very flexible, you can even mount a file system living in a file present in a folder of a mounted device to another folder in your file system. You did something similar by mounting the existing mountpoint folder of your already mounted device to a new mountpoint. When mounting something without explicitly specifying a mountpoint antiX defaults to mount it to /media/<username>/<devicename>.

                              You’ll have to think about your concepts about the way how you try to use linux. Really, it is not meant to use root by default, and it won’t ever work properly (as you have observed already). All the error messages and problems concerning file access you report here are caused by this.

                              Basically the problem when running a file manager as root is: It’ll start all the programs in root context also when accessing them from within its gui. This is not a good idea for all your tasks. You have posted yourself, that the programs complain about the way you try to work on your PC:

                              root@antix1:/media/sda2# VLC is not supposed to be run as root. Sorry.

                              Well, it’s your system, and it’s linux, so you are free to do it anyway. (Don’t complain about all the problems rising from doing it anyway, you have been warned)

                              It is not a good idea to run any filemanager as root by default, this is meant only for rare occasions you have to perform some administrative tasks which can’t get done in another way by ordinary user. And you simply don’t need it.

                              There are several ways to overcome your problem.
                              Even if this partition is some TiB of size, you won’t come around to set at least the file permissions straight to be able to work everyday in a sensisble way on files stored on it. This is not a problem, as long you do use it actually for backup purposes occasionally only, in this case you can use actually root file manager to perform the copy actions needed. This task is something you won’t perform every two minutes, and no other programs are involved. But if you want to really work on it (using programs to open/read/write/play files stored on it) this is no good.

                              First option: change ownership and permissions
                              Set the ownership of all the files and folders stored on your device to
                              root:users
                              using the recursive option as I described some postings above. (I presume your user is member of the group users) If you want to have it set to a more narrowed access use the group with the same name as your user, which he also should be member of.

                              sudo chown -R root:users /media/sda2/

                              Then change all the permissions of the files to rw-rw-r– or rw-rw—- (the folders to rwxrwxr– or rwxrwx—

                              find /media/sda2 -type d -print0 | sudo xargs -0 -r chmod 774
                              find /media/sda2 -type f -print0 | sudo xargs -0 -r chmod 664

                              Alternatively you could use 770 (folders) and 660 (files) here instead, to exclude “all” from seeing and reading files at all. Since your user is member of the group to which is granted sufficient permission, this is enough already.

                              Advantage: This way you don’t need to allow full file access to “all” (=”world”).
                              I intentionally didn’t use the -R option present in chmod here, since you need to treat directories and files differently:
                              The execute permission has to be set on folders to be able to rename (or move) files within a folder, otherwise this task will fail in file manager later.

                              Second option: keep ownership, but change permissions
                              keep the ownership of the files on your device the way you have it (root:root) and obviously want to keep it. Only change the permissions set on all the files stored straight:

                              find /media/sda2 -type d -print0 | sudo xargs -0 -r chmod 777
                              find /media/sda2 -type f -print0 | sudo xargs -0 -r chmod 666

                              Drawback: The “whole world” gets write access to the files this way. You need it that way, since otherwise your user is excluded from access to the files.

                              The question must be allowed: If you grant full access to everybody anyway, why do you insist to keep the ownership by root? It’s way more easy to change the ownership than to handle the permissions for files and folders separately: Folders need the execute flag set, files should not have set it by default.

                              So I would do it that way:

                              Third option (and in my eyes best soulution, and what I had originally recommended): change ownership only

                              sudo chown -R user:group /media/sda2/

                              (replace user and group both by your actual username, or use “users” or “root” for the group, and make sure to use the correct path where your drive is actually mounted to)

                              Each of these possible solutions will take some time, but it will solve all your trouble. It’s up to you whether you insist on trying to put the cart before the horse. Using programs (including file managers) as root by default enforced by keeping ownership and permissions of files which must be accessed having set in an inappropriate way is exactly what I’d call like that.

                              I’d recommend you to experiment with the above commands on a test folder containing some test subfolders and files, in which you have set the ownership and permissions exactly the way you have them on your external storage drive. Check the behavior (accessing by programs and file managers without being root) before applying one of the options from above, and check the behaviour afterwards again. Set the ownership back to original before applying another from the above options. Once you have found out what suits you best, let it run on your big external storage.

                              P.S.: You didn’t read me correctly. I meant the rox internal log console, not a console rox was originally started from. See attached screenshot.

                              Windows is like a submarine. Open a window and serious problems will start.

                              #82478
                              Member
                              dugin
                                Helpful
                                Up
                                0
                                ::

                                Robin, thanks for the lengthy discussion. I will study your suggestions. I did view the Rox log from context menu, Window > Show log. It did not record any details like failure to perform a task, rather mostly about occasional permissions change or just opening the app. In regard to the only acquired error message, I believe Rox-as-root is behaving imperfectly, with one foot in root and the other foot in home/demo. For example, Rox expects to find hidden /.desktop files in /root when these files obviously reside in /home/demo. It seems to me that Rox is dysfunctional if the home/demo pathname is not included in the root identity. I am keeping an open mind to more comprehensive changes, but right now I am sorting out routine tasks between Rox, Rox-as-root, SpaceFM, and terminal to see if I can accomplish my goals. For example, if I can edit text files on the data partition with SpaceFM, then I can continue to document my work, using antiX. I’m still using the same OS I’ve run for the last 5 years, it’s just slowly losing functionality from obsolescence. You know, libavcodec warnings and so on. Every time I’ve ever installed antiX, maybe 5 or 6 times now, I have always installed SpaceFM; I’m just more familiar with Rox. BTW, how does one transfer files or directories betweem two logical drives using SpaceFM (not terminal)?

                                Christophe, I appreciate you reminding me to update apt, and instructing me how to perform the update. Maybe ten minutes after I got that refusal (unable to locate pkg) to install xfburn, I tried again and it installed, so I have xfburn now. I tried to install cli-aptix as well, but it also failed with some files missing, so I’m kinda gunshy now. Will this program install without a hitch after updating? Or should I expect some minor missing directories/files? It will probably install fine after updating.

                                I like antiX, the fact that it’s smaller, does frugal installs, liveUSB install, yet it’s still semi-conventional, just what I need. I feel my issues would be the same or worse if I were using any other of the top 10 or 15 Linux distros. I’ve tried most of them, at some point. I picked antiX out of all of them, for good reason.

                                • This reply was modified 1 year ago by dugin.
                                #82493
                                Member
                                ModdIt
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Hallo dugin,
                                  yet again you claim rox, antiX is disfunctional.

                                  Set file and folder permissions correctly instead of blaming the tools you have and not following, dismissing
                                  advice given by numerous forum members.

                                  May I also politely suggest you go to http://catb.org/~esr/faqs/smart-questions.html and take a long slow read.

                                Viewing 15 posts - 136 through 150 (of 154 total)
                                • You must be logged in to reply to this topic.