![]() |
shell commands fail w/o notice ?
I'm quite confused with the Xterm interface on my Maemo5 N900 : It's there, it looks like a useful shell, but when I try to actually do something with it it behaves weirdly...
Consider this : ~/MyDocs/.documents $ ls -la myfile -rw-r--r-- 1 user root 579498 Jan 6 02:14 myfile ~/MyDocs/.documents $ chmod 755 myfile ~/MyDocs/.documents $ ls -la myfile -rw-r--r-- 1 user root 579498 Jan 6 02:14 myfile Why is the file still non-executable ? And why did the shell not issue some kind of error ? I tried to ~/MyDocs/.documents $ sudo chmod 755 myfile But that w/ the exact same result : Job not done and no error. When I issue a "which chmod" I get a reassuring /bin/chmod... I'm obviously missing something, a week ago I tried to create a simple symlink but to no avail... Please point me in the right direction, as for now I can't do much w/ the shell :( |
Re: shell commands fail w/o notice ?
because you are in mydocs which is FAT32 you cannot do the same linux permission stuff there as you can with your linux partition.
|
Re: shell commands fail w/o notice ?
Arg ! This is happening to me all the time, I forgot wich FSystem I'm working on...! Thanks !
|
Re: shell commands fail w/o notice ?
Actually you can chmod files on the MyDocs partition, unless I am misunderstanding your problem. But every time I run into the problem you describe, I have to do a filesystemcheck because the superblock got corrupted, one way or another.
So, when I run into that problem, I unmount the MyDocs partition, fsck -a the now unmounted partition and remount after that. |
Re: shell commands fail w/o notice ?
The mount options for /home/user/MyDocs specify noexec along with a fmask to ensure files are 644 (note dmask sets chmod 7777 for directories); see here:
Code:
~ $ grep MyDocs /etc/fstab a) Remove the noexec option and alter the fmask to force any file to be executable from with /etc/fstab (which is autogenerated, so this will need to be altered every time you boot?) or b) unmount manually /home/user/MyDocs and then manually remount with your preferred mount options. Check the mount manpage for more details on mount options http://linux.die.net/man/8/mount There may be other threads on here regarding the specifics of fstab manipulation - give the search option a whirl. |
Re: shell commands fail w/o notice ?
Quote:
|
Re: shell commands fail w/o notice ?
Quote:
So, in order to get the job done, I did the following Code:
sudo gainroot AFAIK, sh scripts can be run from a noexec partition. Binaries not. So the answer is, yes, I use defaults. |
Re: shell commands fail w/o notice ?
Thinking out loud, the only reason I can see you wanting to use the large partition for executables would be if you had ran out of room in /dev/mmcblk0p2 and wanted to store a large executable in there (although the original poster never stated any specific intentions).
If so, one solution would be to create a ext3 device with dd in /home/user/MyDocs/somewhere, and loopmount then add to your path. You can then symlink like a crazy mofo. I'll use my mounted SD card just to be safe Use DD to create a block device (in this case 500MB). Code:
Nokia-N900:~# dd if=/dev/zero of=/media/mmc1/bigbin bs=1024 count=512000 Code:
Nokia-N900:~# mkfs.ext3 /media/mmc1/bigbin Code:
Nokia-N900:~# mkdir /home/user/bin Code:
Nokia-N900:~# mount -o loop /media/mmc1/bigbin /home/user/bin Code:
Nokia-N900:~# su - user Code:
~ $ PATH=$PATH:/home/user/bin |
Re: shell commands fail w/o notice ?
Interesting. I am on the verge of completely wiping my device for the first time since I got it, and I must admit your approach sounds tempting.
I might actually follow that path. PS: Forgot to ask, are there any repercussions, removing the noexec paramater from fstab? |
All times are GMT. The time now is 19:45. |
vBulletin® Version 3.8.8