Active Topics

 


Reply
Thread Tools
Posts: 18 | Thanked: 1 time | Joined on Aug 2011
#1
Hi,

Probably due messing with a own Squeeze easy debian image, I have problems with my user rights on my n900. Is it possible to just erase and restore my home folder?

Code:
$ cd /home
-bash-2.05b$ ls -l
drwx------    2 root     root        16384 Jan  1  1970 lost+found
drwxr-xr-x   19 root     root         4096 Aug 20 07:19 opt
drwxr-xr-x   52 1000     libuuid      4096 Aug 21 02:03 user
Code:
$ ls -l
drwxr-xr-x    2 1000     libuuid      4096 Aug 19 12:37 Docs
drwxr-xr-x    3 user     users        4096 Aug 19 04:26 Maps
drwxrwxrwx   14 user     root        65536 Aug 21 12:15 MyDocs
-rw-r--r--    1 root     root         4521 Aug 21 09:00 Xorg.0.log
-rw-r--r--    1 user     users         350 Nov 29  2010 imagelist-fremantle-01
-rw-r--r--    1 user     users         350 Nov 29  2010 imagelist-fremantle-01.old
drwxr-xr-x    2 user     users        4096 Aug 20 03:49 img-install
drwxr-xr-x    5 user     users        4096 Aug 20 12:58 mount
-rw-r--r--    1 1000     1000           12 Aug 19 12:35 test

Last edited by rooz; 2011-08-21 at 10:16.
 
Posts: 69 | Thanked: 55 times | Joined on Nov 2009
#2
try in a shell:
gainroot
cd /home
chown -R user.users user/
 
Posts: 18 | Thanked: 1 time | Joined on Aug 2011
#3
chown: user/MyDocs: Operation not permitted


That's the strange thing, all though I did sudo gainroot, not permitted ... :/
 
Posts: 237 | Thanked: 274 times | Joined on Jul 2010
#4
don't worry, that's because MyDocs is vfat, and permissions doesn't apply there.
you made chown work recursively, so it went through MyDocs like any other folder.
 
Posts: 18 | Thanked: 1 time | Joined on Aug 2011
#5
Are you sure? So /home/user/MyDocs/bin is not a good place to start bash scrips from (e.g. permissions denied)

Hm then I wonder if I have the right rights in the /home folder to use folders like .icedove for example within easy Debian....

Code:
$ cd user/MyDocs/
-bash-2.05b$ ls -l
drwxrwxrwx    3 user     root        65536 Aug 19 06:15 Books
drwxrwxrwx    2 user     root        65536 Aug 21 14:37 DCIM
drwxrwxrwx    2 user     root        65536 Mar 30  2010 Mac OS
-rw-r--r--    1 user     root           27 Mar 30  2010 autorun.inf
drwxrwxrwx    2 user     root        65536 Aug 20 08:49 bin
Code:
$ ls -l
drwxr-xr-x    2 user     users        4096 Aug 19 12:37 Docs
drwxr-xr-x    3 user     users        4096 Aug 19 04:26 Maps
drwxrwxrwx   14 user     root        65536 Aug 21 12:15 MyDocs
-rw-r--r--    1 user     users        4521 Aug 21 09:00 Xorg.0.log
-rw-r--r--    1 user     users         350 Nov 29  2010 imagelist-fremantle-01
-rw-r--r--    1 user     users         350 Nov 29  2010 imagelist-fremantle-01.old
drwxr-xr-x    2 user     users        4096 Aug 20 03:49 img-install
drwxr-xr-x    5 user     users        4096 Aug 20 12:58 mount
-rw-r--r--    1 user     users          12 Aug 19 12:35 test

Last edited by rooz; 2011-08-21 at 13:03.
 
Posts: 237 | Thanked: 274 times | Joined on Jul 2010
#6
My docs is a fat partition (block device /dev/mmcblk0p1), launching executables from there is a security risk, therefore it is mounted with no-exec option.
so you can't run any executable from MyDocs directly whether it is a script or a binary.
just for scripts you can execute them by writing sh ./scriptname.sh, but you can't run them with ./scriptname.sh even if the first line on the script is #!/bin/sh
also chmod +x ./scriptname.sh will not work,
unix file attributes can't be stored on a fat file system, simple as that.

if you insist on running executables from MyDocs, you can delete the no-exec option from the script where MyDocs is mounted, I can't remember where is it located right now.
doing so any file can be executed on MyDocs ! this is a security vulnerability, but can has some desirable effects, such as running pregames from MyDocs directly without resizing /opt, normally this shouldn't be done.
 
Posts: 18 | Thanked: 1 time | Joined on Aug 2011
#7
Ok, thanks for now!
 
Reply


 
Forum Jump


All times are GMT. The time now is 20:12.