Forum › Forums › New users › New Users and General Questions › Questions about permissions in antiX17
- This topic has 15 replies, 5 voices, and was last updated Nov 4-9:52 am by Brian Masinick.
-
AuthorPosts
-
October 28, 2017 at 11:03 am #970Member
Richard
MX user since MX14 setting up antiX17 vanilla installation.
Scripts that I created with MX16 fail:
Xfce4-terminal -.H -e ”
su-to-root -X -c ./Ursync.sh”Haven’t installed Xfce4-terminal yet due to no internet connection.
Have tried lxterminal & rxvt so far without success with various combinations of options. Tried, among others,
rxvt –hold -e “su-to-root -X -c ./Ursync.sh” but only opens in text editor. Permissions set to 777.Are permissions set up different from MX?
Appreciate your suggestions.
Richard.
- This topic was modified 5 years, 6 months ago by Richard. Reason: Clarify reasons
- This topic was modified 5 years, 6 months ago by Richard.
ASUSTeK 900 EeePC; RAM: 1.96 GiB;
antiX19.3; 4.9.235-antix.1-486-smp;
HDD: Super Talent STT 30.08 GiB
+SD & External HDD.October 28, 2017 at 11:37 am #971Forum Admin
BitJam
::It is not clear to me what you are trying to do.
In antiX we use “sudo” and “gksu” to temporarily run things as root. The benefit of doing this is your password is remembered for a while so you don’t have to constantly enter your password over and over again. This is very handy when running programs from the Control Centre. We made this change when gksu (or a program like it) stopped remembering the root password and we couldn’t find a way to fix it.
Context is worth 80 IQ points -- Alan Kay
October 28, 2017 at 12:05 pm #975Member
Richard
::Bash script, [code]Xfce4-terminal -H -e ”su-to-root -X -c ./Ursync.sh”[/code] fails due to no Xfce4.
Trying to rewrite script to use rxvt or lxterminal, but upon execution it opens a text editor.Have tried the following, [code]rxvt –-hold -e “su-to-root -X -c ./Ursync.sh”[/code]
But with same result, script opens in text editor instead of executing.
Writing from phone; hopefully code tags function.
- This reply was modified 5 years, 6 months ago by Richard.
ASUSTeK 900 EeePC; RAM: 1.96 GiB;
antiX19.3; 4.9.235-antix.1-486-smp;
HDD: Super Talent STT 30.08 GiB
+SD & External HDD.October 28, 2017 at 12:08 pm #976Member
Richard
::I’ll try using sudo instead of su-to-root. More later.
Thanks.- This reply was modified 5 years, 6 months ago by Richard.
ASUSTeK 900 EeePC; RAM: 1.96 GiB;
antiX19.3; 4.9.235-antix.1-486-smp;
HDD: Super Talent STT 30.08 GiB
+SD & External HDD.October 29, 2017 at 5:27 am #1103Member
jdmeaux1952
::@Richard, Are you attempting to run XFCE4 without installing it?
The Kernel has my back covered.
AMD desktop FX-8320 ASUS M5A97 LE R2.0 nVidia GeForce 730 GT 8 Gb memory
MSI laptop S6000 i5-460M 4 Gb ramA great mind is something to get terribly wasted.
LRU# 563815October 29, 2017 at 12:39 pm #1133Member
Richard
::Thanks, JD.
Well, yes and no. 🙂I’m trying to learn how to rewrite scripts written for MX to make them execute in antiX-17.
Permissions seem to be set differently from MX. Trying to learn the rules. The contents of my scripts execute from a terminal but when included in the script, tells me that it is not permitted. I suspect eudev (I think) but have not found how to make them work without rewriting fstab. The permissions also seem more restrictive than MX. Just want to learn how to make bash scripts run on aX17?
Looking for information.
- This reply was modified 5 years, 6 months ago by Richard.
ASUSTeK 900 EeePC; RAM: 1.96 GiB;
antiX19.3; 4.9.235-antix.1-486-smp;
HDD: Super Talent STT 30.08 GiB
+SD & External HDD.October 29, 2017 at 12:49 pm #1141Member
jdmeaux1952
::Learn to keep detailed notes of each step you do. That way you can usually figure what you may have done wrong, Or at least have an idea of what to ask about.
The Kernel has my back covered.
AMD desktop FX-8320 ASUS M5A97 LE R2.0 nVidia GeForce 730 GT 8 Gb memory
MSI laptop S6000 i5-460M 4 Gb ramA great mind is something to get terribly wasted.
LRU# 563815October 29, 2017 at 12:54 pm #1145Member
Richard
::Good advice.
I’ll keep working on it.NOTE: shell scripts run as user but not as root.
Is that by design?- This reply was modified 5 years, 6 months ago by Richard.
ASUSTeK 900 EeePC; RAM: 1.96 GiB;
antiX19.3; 4.9.235-antix.1-486-smp;
HDD: Super Talent STT 30.08 GiB
+SD & External HDD.October 29, 2017 at 1:28 pm #1152Forum Admin
BitJam
::@Richard, it would be easier for us to help you and provide you with the information you seek if you were less stingy information-wise. Being precise with terminology is also a big plus. If you think there is a problem with permissions then it would help if you provided information about the file system on which you are having permission problems. For example, you can’t run programs on a file system if it is mounted with the “noexec” option. There could also be a problem with the permissions of the file itself. Permissions can be lost when files are copied or downloaded. Use the command “ls -lh $SCRIPT” to display the permissions of the file named $SCRIPT.
Also, telling us what you want to do more precisely often helps. Another big help is providing us with the *exact* error messages you get. You make it much more difficult for us to figure out what is going on when you don’t provide the exact error message. The main purpose of error messages is to report what the problem is, from which we can often figure out where the problem is. Even when error messages are not meaningful to you, they will often be meaningful to others. It’s like you are looking for a specific book but instead of telling us the author and the title you just tell is “it’s a book about dogs”. To be honest, the majority of problems can be solved by simply Googling the *exact* error message.
It is usually a good idea to provide the output of the command “inxi -F” inside of [ code ] … [ /code ] tags (no spaces) which provides us a lot of information about your system.
Running Bash scripts on antiX is no different from running them on MX or any other Linux distro. For example edit a file named “hello” in your home directory to contain:[code]#/bin/bash
echo hello world[/code]
Then run the commands:chmod a+x hello
./helloIt will print out “hello world”.
If you have a severe problem like “scripts don’t work” then it is extremely likely that the problem is with something you are doing and not with the antiX distro. Therefore if you provide us with more details about what exactly you are doing then it is much easier for us to figure out what is wrong. Even if you are doing nothing wrong, telling us exactly what you are doing helps us rule out user error.
Context is worth 80 IQ points -- Alan Kay
October 29, 2017 at 1:43 pm #1153Anonymous
::Can we rule out typographical errors?
Asking because xfce4-terminal should be all lowercase and (click the {—link, eh) I don’t expect “-.H” dash.dot.CapH would be recognized as a valid commandline option.Visit the “Disks” tab of the antiX ControlCenter. Explore the available automounting rule-setting options.
Perhaps the “permissions” problem is due to inability your scripted command to perform a mount operation.Revisit su-to-root manpage, and reconsider whether -X is appropriate
and bear in mind that, when changing the commandline from su-to-root to sudo(or gksu), “-X” will not be a recognized option.October 29, 2017 at 2:12 pm #1156Member
Richard
::Thanks BitJam, skidoo, JD,
Apologies for the cryptic notes. Writing from phone is a problem.
Yes, there are typos due to the helpfulness of auto-correct. 🙂 The xfce4-terminal script works fine on MX to rsync data to/from my netbook to a USB pendrive, and then to/from my desktop.
I will take all your comments for study and review of my situation. Apologies for not transcribing everything to the phone; however, the error messages are “permission denied” when it doesn’t just open the script in my text editor.
Apologies for the aggravation. Will test some more with your above comments in mind, but prepare a better description, for when I can connect from the problematic netbook, with the scripts, inxi output, and file permission info.
Thanks again. Give me some time to organize data.
Regards, Richard.
ASUSTeK 900 EeePC; RAM: 1.96 GiB;
antiX19.3; 4.9.235-antix.1-486-smp;
HDD: Super Talent STT 30.08 GiB
+SD & External HDD.October 29, 2017 at 2:21 pm #1157Member
Richard
::I’m sure the problem is something I did or did not do. PEBKAC is the word.
Appreciate all of your suggestions and comments.
Regards.ASUSTeK 900 EeePC; RAM: 1.96 GiB;
antiX19.3; 4.9.235-antix.1-486-smp;
HDD: Super Talent STT 30.08 GiB
+SD & External HDD.November 2, 2017 at 12:06 pm #1696Member
Richard
::Write up for Permission question?
A hearty thank you to BitJam, Skidoo and jdmeaux,
for your forebearance. Your suggestions led me
to resolve my problem and learn a bit more about
antiX, fstab and permissions.antiX 17 is very nicely thought out, loaded with
utilities, SpaceFM and I’ve always liked how fast
IceWM boots; espeacially on the 32bit netboook.
I add Double Commander because I’m lazy and love
the convenience.Below is the write-up of information that you all deserved
in the beginning. Not being able to do everything I needed
on antiX in my limited access to wifi, led me to abuse your
good nature and attempt to ask a question via Android without
access to my antiX install, inxi, /etc/fstab, etal nor internet.1) Equipment: Acer Aspire One netbook
$ inxi -Fxz System: Host: Cucuta Kernel: 4.10.5-antix.1-486-smp i686 bits: 32 gcc: 6.3.0 Desktop: IceWM 1.4.2 Distro: antiX-17_386-full Heather Heyer 24 October 2017 Machine: Device: other-vm? System: Acer product: AOA150 v: 1 serial: N/A Mobo: Acer model: N/A serial: N/A BIOS: Acer v: v0.3301 date: 05/09/2008 Battery BAT1: charge: 25.2 Wh 100.0% condition: 25.2/45.5 Wh (55%) model: SIMPLO UM08B74 status: Full CPU: Single core Intel Atom N270 (-HT-) arch: Bonnell rev.2 cache: 512 KB flags: (pae sse sse2 sse3 ssse3) bmips: 3192 clock speeds: max: 1600 MHz 1: 1066 MHz 2: 1600 MHz Graphics: Card: Intel Mobile 945GSE Express Integrated Graphics Controller bus-ID: 00:02.0 Display Server: X.Org 1.19.2 drivers: intel (unloaded: modesetting,fbdev,vesa) Resolution: 1024x600@60.00hz OpenGL: renderer: Mesa DRI Intel 945GME x86/MMX/SSE2 version: 2.1 Mesa 13.0.6 Direct Render: Yes Audio: Card Intel NM10/ICH7 Family High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0 Sound: Advanced Linux Sound Architecture v: k4.10.5-antix.1-486-smp Network: Card-1: Realtek RTL8101/2/6E PCIE Fast/Gigabit Ethernet controller driver: r8169 v: 2.3LK-NAPI port: 3000 bus-ID: 02:00.0 IF: eth0 state: down mac: <filter> Card-2: Qualcomm Atheros AR242x / AR542x Wireless Network Adapter (PCI-Express) driver: ath5k bus-ID: 03:00.0 IF: wlan0 state: down mac: <filter> Drives: HDD Total Size: 160.0GB (3.1% used) ID-1: /dev/sda model: Hitachi_HTS54321 size: 160.0GB ID-2: /dev/mmcblk0 model: N/A size: 15.8GB Partition: ID-1: / size: 8.6G used: 2.8G (34%) fs: ext4 dev: /dev/sda6 ID-2: swap-1 size: 2.20GB used: 0.00GB (0%) fs: swap dev: /dev/sda5 Sensors: System Temperatures: cpu: 58.0C mobo: N/A Fan Speeds (in rpm): cpu: N/A Info: Processes: 137 Uptime: 17 min Memory: 99.1/990.5MB Init: SysVinit runlevel: 5 Gcc sys: 6.3.0 Client: Shell (bash 4.4.121) inxi: 2.3.402) Installed antiX-17_386-full.iso, again, to a clean partition,
to eliminate the changes that I had made earlier.I wanted to convert a couple of scripts for rsync to be able
to use antiX in the same manner that I use MX16 on my netbook.
Because of my lack of internet at home, I carry the netbook
to a friends house for limited use of wifi, then rsync certain
folders to a pendrive, then rsync the pendrive to my desktop.3) In order to run the scripts on my /media/DATA partition,
I modified fstab, similar to what I use in MX. I made good
use of BitJam’s comments about permissions. The modifications
are as follows:# /etc/fstab, antiX-17: static file system information # Created by make-fstab on Mon Oct 30 15:53:42 -04 2017 # <file system> <mount point> <type> <options> <dump/pass> #-> /dev/sda6 label=AX17p6 UUID=34a06da8-ef8e-4985-9362-b9a955727fdc / ext4 defaults 1 1 #-> /dev/sda5 label=SWAP UUID=b695ee48-617c-457c-a448-e5ee69de3e82 swap swap defaults 0 0 #-> /dev/sda1 label=WINX UUID=12C2EBC7C2EBAD63 /media/WINX ntfs-3g noauto,noexec,uid=1000,gid=users,dmask=002,fmask=113,users 0 0 #-> /dev/sda2 label=MX160p2 UUID=f9a4d786-1eb1-4f98-91a9-5d62c3458f90 /media/MX160p2 ext4 exec,users 0 0 #-> /dev/sda3 label=DATA #UUID=12FD732748AE8979 /media/DATA ntfs-3g noauto,noexec,uid=1000,gid=users,dmask=002,fmask=113,users 0 0 UUID=12FD732748AE8979 /media/DATA ntfs-3g exec,uid=1000,gid=users,dmask=002,fmask=113,users 0 0 #-> /dev/sda7 label=AX17p7 UUID=a6087ad6-4c0b-48e0-929f-f980b9d82971 /media/AX17p7 ext4 noauto,exec,users 0 04) Set up to run the following test shell script to rsync data from netbook to pendrive:
#!/bin/bash ## Usync.sh: uses rsync copy certain data folders to pendrive. # ## -a, --archive = archive mode; equals -rlptgoD (no -H,-A,-X) # -r, --recursive = recurse into directories # -l, --links = copy symlinks as symlinks # -p, --perms = preserve permissions # -t, --times = preserve modification times # -g, --group = preserve group # -o, --owner = preserve owner (super-user only) # -D = same as --devices --specials ## -v, --verbose = increase verbosity ## -u, --update = update files # echo "" echo "rsyncing to USB..." rsync -avu --progress /home/richard/0-New-stuff/ /media/BLAKDAT/0-New-stuff rsync -avu --progress /home/richard/0-ToDo/ /media/BLAKDAT/0-ToDo # rsync -avu --progress /DATA/archives/ /media/BLAKDAT/archives rsync -avu --progress /home/richard/Documents/ /media/BLAKDAT/Documents rsync -avu --progress /home/richard/Downloads/ /media/BLAKDAT/Downloads # the rest removed for testing # echo "" echo "rsync completed."5) And it executes as expected.
6) Summary:
I use a separate /DATA partition that is mounted in MX with full permissions.
At install, antiX put them all in /media/DATA with “noauto,noexec..” which
was what I had overlooked, in the contents of /etc/fstab above, the drastic changes
I had made to my MX fstab.Changing these allows the rsync scripts to run via urxvt directly.
No root access needed.I understand that these are non-standard changes
and do not reccomended them for production systems.
Nor for anyone else.
I’m sure there exists a better way to accomplish this,
as regards permissions.Thanks, again, for your comments and suggestions.
Richard.Note: direct [code][/code] don’t seem to work in new antiX forum. rh
- This reply was modified 5 years, 6 months ago by Richard.
ASUSTeK 900 EeePC; RAM: 1.96 GiB;
antiX19.3; 4.9.235-antix.1-486-smp;
HDD: Super Talent STT 30.08 GiB
+SD & External HDD.November 2, 2017 at 2:03 pm #1702Forum Admin
BitJam
::I’m glad you got it to work! Thanks for all of the information! I too use a separate /data partition (lowercase in my case). I started doing that on Solaris back in the early to mid 1990s. I think it would be really cool if distros provided better support for a separate /data partition. My ext4 /data partition is mounted with the options “relatime,user,exec,dev”. It mounts automatically at boot-time. IMO having a separate /data partition makes a lot more sense than a separate /home partition.
AFAIK, the permission problems stem from using an ntfs file system. I don’t think normal Linux/Unix file permissions work there so the choice is between making everything executable or making nothing executable. Using either one for the default will cause nasty problems from some people. If you want your data partition to work better OOTB, you may want to consider moving to a real file system such as ext4 and use samba to transfer data to and from Windows. I think there are people here who can help you set that up. Of course you need two machines for that to work while with ntfs you can do it all on one machine.
Context is worth 80 IQ points -- Alan Kay
November 3, 2017 at 6:07 pm #1811Member
Richard
::I hope to reformat that ntfs partition some time soon. It’s a work-related backup from a while back.
I changed the original ntfs /DATA partition options in /etc/fstab to
“auto,exec,…”, leaving the rest as make-fstab created it.Running the complete rsync script, with permissions, 777 as user failed. So, opened a root console and it executed as desired. Not an elegant solution but a solution nonetheless.
Thanks again for another learning experience.
Regards, Richard.- This reply was modified 5 years, 6 months ago by Richard.
ASUSTeK 900 EeePC; RAM: 1.96 GiB;
antiX19.3; 4.9.235-antix.1-486-smp;
HDD: Super Talent STT 30.08 GiB
+SD & External HDD. -
AuthorPosts
- You must be logged in to reply to this topic.