WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Write Permission Error  (Read 61 times)

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 412
Write Permission Error
« on: February 12, 2026, 11:13:56 AM »
Hi everyone,

I got the acquisition program running on the second (cloned) receiver!, very excited!, but, I can't save data to the CF card at the moment. To verify that this is the problem, I simply tried to copy a text file to the data directory (from within my home directory), for example, if I try;

Code: [Select]
cp log.txt /home/tc/data

I get a Write permission error, but if I do the above command with "sudo" preceding it, can copy the file no problem.

The acquisition program actually consists of two programs, mt_adc and mt_logger, as you can see in the script below (start_logger_TC.sh), mt_adc is being ran as root but mt_logger (the one saving the data) is not;

Code: [Select]
#!/bin/sh
#
#  script tied to the "MT ADC" launcher
#
aterm -geometry 80x5+120+40 -title "MT ADC" -e sh -c "sudo nice --adjustment=-20 /home/tc/.local/bin/mt_adc" &
sleep 1
aterm -geometry 80x12+120+180 -title "ADC Log" -e sh -c "tail -f /home/tc/logs/mt_adc.log" &
sleep 12
aterm -geometry 80x12+120+440 -title "MT Logger" -e sh -c "/home/tc/.local/bin/mt_logger" &
sleep 1
pc=$(pidof mt_logger)
taskset -p 1 $pc
pc=$(pidof mt_adc)
sudo taskset -p 2 $pc


I could perhaps change mt_logger to run as root as well but the script as above works fine on my original "BASE" receiver, so I'm puzzled since I think the permissions on /home/tc/data are the same for both the "BASE" and the new (cloned) "ROVER" receivers.

Here's the directory output on my "BASE" receiver, which works to save data onto the CF-card (/home/tc/data).
Code: [Select]
total 72348
-rw-r--r--  1 tc staff   548864 May 23  2021 24dsi-2.6.33.3-l1-rt19-686.tcz
drwxr-sr-x  3 tc staff     4096 Jun 11  2021 24dsi.linux.3.17.52.0/
drwxr-sr-x  3 tc staff     4096 May  6  2021 24dsi.linux.4.11.91.32.0/
-rwxr-xr-x  1 tc staff  1678134 May  6  2021 24dsi.linux.4.11.91.32.0.tar.gz
-rw-r--r--  1 tc staff        0 Nov 24  2022 Xvesa_modes.txt
-rw-r--r--  1 tc staff        0 Feb 12 15:13 basedir.txt
drwxr-sr-x  4 tc staff     4096 Jul  5  2021 chrony/
-rw-r--r--  1 tc staff        0 Feb  4 20:43 con.txt
drwxr-sr-x  2 tc staff     4096 Jul 22  2021 config/
-rwxr-xr-x  1 tc staff    88700 May 11  2021 config-2.6.33.3-l1-rt19
lrwxrwxrwx  1 tc staff       14 Jun 25  2021 data -> /mnt/sda5/data
drwxr-sr-x  4 tc staff     4096 May 24  2023 digitemp/
-rw-r--r--  1 tc staff     1302 Feb  5 22:00 disk.txt
-rw-r--r--  1 tc staff     1095 Feb  6 15:56 diskv2.txt
drwxr-sr-x  3 tc staff     4096 Nov 26  2021 dracal/
drwxr-sr-x  3 tc staff     4096 Feb 10 15:57 grabserial-master/
-rw-r--r--  1 tc staff    17860 Feb  5 14:09 index.html
drwxr-sr-x 24 tc staff     4096 May 12  2021 linux-2.6.33.3/
-rwxr-xr-x  1 tc staff 67330079 May 11  2021 linux-2.6.33.3-patched.tbz2
drwxr-sr-x  2 tc staff     4096 Jul 22  2021 logs/
-rw-r--r--  1 tc staff     4097 Nov 24  2022 lspci_output.txt
-rw-r--r--  1 tc staff       18 Aug 21  2021 message.txt
-rw-r--r--  1 tc staff      854 Nov 24  2022 modes.txt
drwxr-sr-x  4 tc staff     4096 Jun 27  2021 mt_adc/
drwxr-sr-x  2 tc staff     4096 Jun 27  2021 mt_logger/
-rw-r--r--  1 tc staff  2959596 Aug 27  2021 mt_progs.tar.gz
-rw-r--r--  1 tc staff     1457 Feb  3 14:47 network.txt
-rwxr-xr-x  1 tc staff      826 Jul  5  2021 newchrony.conf
drwxr-sr-x  4 tc staff     4096 Oct 30  2023 newest_mt_adc/
drwxr-sr-x  4 tc staff     4096 Nov 12  2021 newest_mt_loggerv1/
-rw-r--r--  1 tc staff     1919 Jul 21  2021 nmea.txt~
-rw-r--r--  1 tc staff   479232 Jun 12  2021 old24dsi-2.6.33.3-l1-rt19-686.tcz
drwxr-sr-x  3 tc staff     4096 Jun 12  2021 oldpackage/
drwxr-sr-x  3 tc staff     4096 May 23  2021 package/
-rwxr-xr-x  1 tc staff      235 Jul 20  2021 parse_chrony.sh
-rwxr-xr-x  1 tc staff      327 Jul 21  2021 parse_nmea.sh
-rwxr-xr-x  1 tc staff      225 May 26  2023 parse_temp.sh
-rwxr-xr-x  1 tc staff      327 May 26  2023 parse_temp.sh~
-rw-r--r--  1 tc staff      324 Oct 17  2021 partcheck.txt
-rwxr-xr-x  1 tc staff   281744 May 11  2021 patch-2.6.33.3-rt19.xz
drwxr-sr-x  5 tc staff     4096 Feb 10 15:51 pyserial-2.2/
-rw-r--r--  1 tc staff      331 Feb  4 19:06 route.txt
-rw-r--r--  1 tc staff      331 Feb  4 19:08 routev2.txt
-rw-r--r--  1 tc staff    85040 Jan  3  2022 screenshot_0103205318.png
-rw-r--r--  1 tc staff    85040 Jan  3  2022 screenshot_0103205329.png
-rw-r--r--  1 tc staff    68154 Jan 24 00:29 screenshot_0124002951.png
-rw-r--r--  1 tc staff    69246 Jan 24 00:31 screenshot_0124003140.png
-rw-r--r--  1 tc staff    72761 Jan 24 17:10 screenshot_0124171053.png
-rw-r--r--  1 tc staff    43402 Feb  3 16:20 screenshot_0203162025.png
-rw-r--r--  1 tc staff    76824 Feb  3 16:39 screenshot_0203163939.png
-rwxr-xr-x  1 tc staff      454 Oct 31  2023 start_logger_TC.sh
-rwxr-xr-x  1 tc staff      392 Mar 26  2023 start_logger_TC.sh~
-rwxr-xr-x  1 tc staff      191 Oct 29  2023 start_temp_log
-rw-r--r--  1 tc staff     1056 Feb 10 18:19 test.log
-rwxr-xr-x  1 tc staff      170 Sep  9  2023 test.sh
-rwxr-xr-x  1 tc staff      165 Sep  9  2023 test.sh~
-rw-r--r--  1 tc staff       29 Feb 10 18:16 test2.log
-rwxrwxr-x  1 tc staff      759 May 28  2021 tinierclock.sh
-rw-r--r--  1 tc staff    14438 Mar 30  2023 top.out

Here's the directory listing on my (cloned) ROVER receiver, the data directory has the same permissions doesn't it? Not sure why I would have a problem copying data to it as regular user "tc".

Code: [Select]
total 72172
-rw-r--r--  1 tc staff   548864 May 23  2021 24dsi-2.6.33.3-l1-rt19-686.tcz
drwxr-sr-x  3 tc staff     4096 Jun 11  2021 24dsi.linux.3.17.52.0/
drwxr-sr-x  3 tc staff     4096 May  6  2021 24dsi.linux.4.11.91.32.0/
-rwxr-xr-x  1 tc staff  1678134 May  6  2021 24dsi.linux.4.11.91.32.0.tar.gz
-rw-r--r--  1 tc staff        0 Nov 24  2022 Xvesa_modes.txt
drwxr-sr-x  4 tc staff     4096 Jul  5  2021 chrony/
drwxr-sr-x  2 tc staff     4096 Jul 22  2021 config/
-rwxr-xr-x  1 tc staff    88700 May 11  2021 config-2.6.33.3-l1-rt19
lrwxrwxrwx  1 tc staff       14 Jun 25  2021 data -> /mnt/sda5/data
drwxr-sr-x  4 tc staff     4096 May 24  2023 digitemp/
drwxr-sr-x  3 tc staff     4096 Nov 26  2021 dracal/
drwxr-sr-x 24 tc staff     4096 May 12  2021 linux-2.6.33.3/
-rwxr-xr-x  1 tc staff 67330079 May 11  2021 linux-2.6.33.3-patched.tbz2
drwxr-sr-x  2 tc staff     4096 Jul 22  2021 logs/
-rw-r--r--  1 tc staff     4097 Nov 24  2022 lspci_output.txt
-rw-r--r--  1 tc staff       18 Aug 21  2021 message.txt
-rw-r--r--  1 tc staff      854 Nov 24  2022 modes.txt
drwxr-sr-x  4 tc staff     4096 Jun 27  2021 mt_adc/
drwxr-sr-x  2 tc staff     4096 Jun 27  2021 mt_logger/
-rw-r--r--  1 tc staff  2959596 Aug 27  2021 mt_progs.tar.gz
-rwxr-xr-x  1 tc staff      826 Jul  5  2021 newchrony.conf
drwxr-sr-x  4 tc staff     4096 Oct 30  2023 newest_mt_adc/
drwxr-sr-x  4 tc staff     4096 Nov 12  2021 newest_mt_loggerv1/
-rw-r--r--  1 tc staff     1919 Jul 21  2021 nmea.txt~
-rw-r--r--  1 tc staff   479232 Jun 12  2021 old24dsi-2.6.33.3-l1-rt19-686.tcz
drwxr-sr-x  3 tc staff     4096 Jun 12  2021 oldpackage/
drwxr-sr-x  3 tc staff     4096 May 23  2021 package/
-rwxr-xr-x  1 tc staff      235 Jul 20  2021 parse_chrony.sh
-rwxr-xr-x  1 tc staff      327 Jul 21  2021 parse_nmea.sh
-rwxr-xr-x  1 tc staff      225 May 26  2023 parse_temp.sh
-rwxr-xr-x  1 tc staff      327 May 26  2023 parse_temp.sh~
-rw-r--r--  1 tc staff      324 Oct 17  2021 partcheck.txt
-rwxr-xr-x  1 tc staff   281744 May 11  2021 patch-2.6.33.3-rt19.xz
-rw-r--r--  1 tc staff        0 Feb 12 15:14 roverdir.txt
-rw-r--r--  1 tc staff    85040 Jan  3  2022 screenshot_0103205318.png
-rw-r--r--  1 tc staff    85040 Jan  3  2022 screenshot_0103205329.png
-rw-r--r--  1 tc staff    68154 Jan 24 00:29 screenshot_0124002951.png
-rw-r--r--  1 tc staff    69246 Jan 24 00:31 screenshot_0124003140.png
-rw-r--r--  1 tc staff    72761 Jan 24 17:10 screenshot_0124171053.png
-rwxr-xr-x  1 tc staff      454 Oct 31  2023 start_logger_TC.sh
-rwxr-xr-x  1 tc staff      392 Mar 26  2023 start_logger_TC.sh~
-rwxr-xr-x  1 tc staff      191 Oct 29  2023 start_temp_log
-rwxr-xr-x  1 tc staff      170 Sep  9  2023 test.sh
-rwxr-xr-x  1 tc staff      165 Sep  9  2023 test.sh~
-rwxrwxr-x  1 tc staff      759 May 28  2021 tinierclock.sh
-rw-r--r--  1 tc staff    14438 Mar 30  2023 top.out


Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 412
Re: Write Permission Error
« Reply #1 on: February 12, 2026, 04:18:39 PM »
Hi everyone,

Sorry for all the posts, I found the problem. It was on the Lubuntu side, the CF-card has Lubuntu on it and if the TC pen drive is not plugged in Lubuntu will boot up, so when I had Lubuntu booted up I made the "data" directory, but the ownership in Lubuntu was "root", so maybe extreme but, in Lubuntu I;

Code: [Select]
sudo chmod 777 data

And now in TC, logged in as regular user "tc", I can copy files to /home/tc/data, and even better, I can start up the big acquisition program and save "burst" (transient) and continuous recorded files!, getting there!

Thanks,

David