Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32

Thread: Just want full root access for everything chown makes no sense :(

  1. #11
    Join Date
    Feb 2013
    Beans
    14

    Re: Just want full root access for everything chown makes no sense :(

    I think I've tried the sudo rm -rf /path/.Trash-999 and the Terminal just prompts me again and nothing seemed to happen.

    Also how do you get out of the code box when making a post?

    I also tried to shred the folder in the .Trash-999 and it just says permission denied. I thought when I deleted something permanently from the regular trash it was suppose to be whipped. Apparently it just gets filed in .Trash-999 and the corrupt and infected files are still there but not visible even after unhidding files.

  2. #12
    Join Date
    Nov 2008
    Location
    Lleida, Spain
    Beans
    1,157
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Just want full root access for everything chown makes no sense :(

    Quote Originally Posted by Visrite View Post
    I think I've tried the sudo rm -rf /path/.Trash-999 and the Terminal just prompts me again and nothing seemed to happen.

    Also how do you get out of the code box when making a post?

    I also tried to shred the folder in the .Trash-999 and it just says permission denied. I thought when I deleted something permanently from the regular trash it was suppose to be whipped. Apparently it just gets filed in .Trash-999 and the corrupt and infected files are still there but not visible even after unhidding files.
    sudo chmod 777 .Trash-999 -R
    sudo rm -rf .Trash-999

  3. #13
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    6,711
    Distro
    Ubuntu

    Re: Just want full root access for everything chown makes no sense :(

    Where exactly is the file located?
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  4. #14
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Just want full root access for everything chown makes no sense :(

    It would help to know the full path to the .Trash-999 file that you are trying to delete. I'm curious where this is. I've never come across a 999 trash file before. Such trash files are usually created when a person or process deletes something outside of their /home directory on a different partition or removable media. The 999 is the user ID of the person deleting. Since Ubuntu assigns user ID starting at 1000, and root is 0, I don't know where the 999 suffix comes from. Please open a terminal and post output of the following:
    Code:
    id
    then,
    Code:
    awk -F":" '{ print "username: " $1 "\t\tuid:" $3 }' /etc/passwd
    Let's see who user ID 999 belongs to.

    On a very important related note, how do you know that this trash contains a virus, or that you were infected through an executable running WINE? Are you assuming it's a virus or do you have confirmation such as a viral scan? All details you remember are critical on this one to providing help.

    Also how do you get out of the code box when making a post?
    I'm afraid I don't understand this question. When posting, I don't ever see a code box--just the posting box that I type into. When I need to define something as code, I just highlight it and click on the hash (#) tag. I never find myself in a code box. Then it's just clicking on "Submit Reply" button to complete post.

    I also tried to shred the folder in the .Trash-999 and it just says permission denied. I thought when I deleted something permanently from the regular trash it was suppose to be whipped. Apparently it just gets filed in .Trash-999 and the corrupt and infected files are still there but not visible even after unhidding files.
    Again, I'm not aware of a "shred" option in the trash. Do you mean permanently delete? I'm not just picking nits here. There is a real shred program in Ubuntu and it performs a different function than what you are trying to do. If you in fact have a shred option, then I'm wondering if you are using Ubuntu. And finally, if, as I suspect, you have user ID 1000, then Ubuntu will not let you delete trash from user 999. This is a security feature that disallows one user from deleting the files of another. If you invoke the nautilus file manager using gksudo as many previous posts have already suggested, then you will have root privileges and can delete any trash you like.

    I'm shutting it down for the evening now, but will look in on this thread again in the morning. Please post output requested above as soon as you can.

  5. #15
    Join Date
    Sep 2012
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Just want full root access for everything chown makes no sense :(

    There are lots of good reasons why Ubuntu does not enable root by default see here https://help.ubuntu.com/community/RootSudo for a few.

    If you need to run a GUI application as root simply press Alt-F2 and enter gksu or gksudo followed by the name of the program. For example

    Code:
    gksu nautilus
    Runs the file manager as root.

    Or in a terminal type

    Code:
    sudo -i
    Then the commands you need to run as root

    Then when you are done

    Code:
    exit
    An alternative is just to prefix the commands that need it with sudo for example

    Code:
    fdisk -l #does not work unless you are root 
    sudo fdisk -l #does work: lists the drives on your computer

  6. #16
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Just want full root access for everything chown makes no sense :(

    I think I've tried the sudo rm -rf /path/.Trash-999 and the Terminal just prompts me again and nothing seemed to happen.
    If you ran the command and then the terminal went back to the prompt - it did what you asked without error. You won't get a 'Hi - we did that and all is ok' message.

    You'll be told if you try to do something and it fails.

  7. #17
    Join Date
    Feb 2013
    Beans
    14

    Re: Just want full root access for everything chown makes no sense :(

    The file was located at:

    /media/ubuntu/harddrivealphanumeric/.Trash-999

    I auto updated in Windows 7 and it installed SP1 and I did a routine scan and it told me a bootkit was installed. After research it looks like this was a pretty common thing to happen with the release of W7SP1. I've been trying to save windows and the bootkit deleted my system restore points. I really wish I could afford an external hard drive to backup all my files, including pictures of my children I never get to see. (Divorce)

    Anyway, I knew it was in the .Trash-999 because my avast told me it was still on the hard drive in that folder.

    @DuckHook

    Here is the output

    Code:
    ubuntu@ubuntu:~$ id
    uid=999(ubuntu) gid=999(ubuntu) groups=999(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),107(lpadmin),124(sambashare)
    ubuntu@ubuntu:~$ awk -F" :" '{ print "username: " $1 "\t\tuid:" $3 }'  /etc/passwd
    username: root:x:0:0:root:/root:/bin/bash        uid:
    username: daemon:x:1:1:daemon:/usr/sbin:/bin/sh        uid:
    username: bin:x:2:2:bin:/bin:/bin/sh        uid:
    username: sys:x:3:3:sys:/dev:/bin/sh        uid:
    username: sync:x:4:65534:sync:/bin:/bin/sync        uid:
    username: games:x:5:60:games:/usr/games:/bin/sh        uid:
    username: man:x:6:12:man:/var/cache/man:/bin/sh        uid:
    username: lp:x:7:7:lp:/var/spool/lpd:/bin/sh        uid:
    username: mail:x:8:8:mail:/var/mail:/bin/sh        uid:
    username: news:x:9:9:news:/var/spool/news:/bin/sh        uid:
    username: uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh        uid:
    username: proxy:x:13:13:proxy:/bin:/bin/sh        uid:
    username: www-data:x:33:33:www-data:/var/www:/bin/sh        uid:
    username: backup:x:34:34:backup:/var/backups:/bin/sh        uid:
    username: list:x:38:38:Mailing List Manager:/var/list:/bin/sh        uid:
    username: irc:x:39:39:ircd:/var/run/ircd:/bin/sh        uid:
    username: gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh        uid:
    username: nobody:x:65534:65534:nobody:/nonexistent:/bin/sh        uid:
    username: libuuid:x:100:101::/var/lib/libuuid:/bin/sh        uid:
    username: syslog:x:101:103::/home/syslog:/bin/false        uid:
    username: messagebus:x:102:105::/var/run/dbus:/bin/false        uid:
    username: avahi-autoipd:x:103:106:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false        uid:
    username: usbmux:x:104:46:usbmux daemon,,,:/home/usbmux:/bin/false        uid:
    username: whoopsie:x:105:110::/nonexistent:/bin/false        uid:
    username: kernoops:x:106:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false    uid:
    username: rtkit:x:107:114:RealtimeKit,,,:/proc:/bin/false        uid:
    username: speech-dispatcher:x:108:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/sh        uid:
    username: colord:x:109:117:colord colour management daemon,,,:/var/lib/colord:/bin/false        uid:
    username: lightdm:x:110:118:Light Display Manager:/var/lib/lightdm:/bin/false    uid:
    username: avahi:x:111:120:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/falseuid:
    username: hplip:x:112:7:HPLIP system user,,,:/var/run/hplip:/bin/false        uid:
    username: pulse:x:113:121:PulseAudio daemon,,,:/var/run/pulse:/bin/false    uid:
    username: saned:x:114:123::/home/saned:/bin/false        uid:
    username: ubuntu:x:999:999:Live session user,,,:/home/ubuntu:/bin/bash        uid:
    username: clamav:x:115:125::/var/lib/clamav:/bin/false        uid:
    When you copy and paste stuff in a code box it puts the box in your reply typing. Then you're stuck there.

    My AV says that the corrupt or infected files are no longer on the hard drive. I've been told it can jump to a router so I'd like advice on how to scan that for viruses.

    I would also like to know if/how to retrieve my windows key from ubuntu. Its worn on the case.

    I'd like to thank everyone for their comments you've all been very helpful. I think after I save these files I'm going to create a VM and try ubuntu from scratch. I hear there is a text I can read an it will help me build ubuntu from the ground up and I feel I can learn a lot if I do just that.

    Additionally I think I'll mark this as closed as my initial question seem to have been answered. You can still comment after solved right?

  8. #18
    Join Date
    Apr 2008
    Location
    Australian in Germany
    Beans
    4,010
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Just want full root access for everything chown makes no sense :(

    Quote Originally Posted by Visrite View Post
    You can still comment after solved right?
    Yep, and I believe you can come back and change it back to "unsolved" if you change your mind.
    Michael

  9. #19
    Join Date
    Sep 2007
    Location
    UK
    Beans
    375
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Just want full root access for everything chown makes no sense :(

    Hi I noticed you first asked for some clarification of chmod and chown and got a debate on the merits of not opening root.

    Its a bad idea to fully open a system but heres a basic explanation of chown and chmod

    chown

    This is to change who the owner of a file is. The owner can be both a user and a group. You will see files marked as root:root or user1:user1.

    This is because you might want to set access permissions for a user and group differently.

    For example you could have the ownership set user1:family
    You could then give user1 read, write and execute permission and only give family read permissions. You might do this with a music archive so only you can add/remove tracks but anyone in the family can play them.

    You set the ownership of a file like this
    Code:
    chown user:group /directory/file
    you can change the permissions on a directory like this

    Code:
    chown user:group /directory
    This wont change the ownership on any files in the directory but any new files will take the settings of the parent folder.

    If you do want to change the sub-directories and files you can use -R (recursive) like this

    Code:
    chown -R user:group /directory
    if a file belongs to another user or root you will have to use sudo to edit it.

    Code:
    sudo chown user:group /directory/file
    if a file or folder is owned by root:root it is usually a VERY bad idea to change it. If you change anything owned by root:root you will at best make your system vulnerable and at worst completely screw it up. a lot of stuff needs to be owned by root:root to work. you should never change ownership from root:root to anything else unless you are an expert and have a very good reason and know what you are doing.

    chmod

    chmod is used to change the permissions. You can change the permissions on a file or folder for the owner, the group and for public.

    Generally you will set read, write and execute permissions for these, although there are some more complex options.

    It is usually a bad idea to give public write permissions or execute permissions. If someone connects to your system and you have public write permissions then anyone will be able to modify your files. If you give public write permissions on system files then you are opening up a serious security hole.

    In the music example above you would give the owner (you) read, write and execute permissions, you would give group read and execute permissions and you would give public no permissions. I'm not sure you need execute permissions for music but for this example why not...

    There are lots of ways to use chmod but I like using the numbers. heres an example

    Code:
    chmod 750 /directory/file
    The first number sets the permissions for owner, the second number sets the permissions for group and the last one sets the permissions for public.

    The numbers work like this
    1= execute
    2= write
    4= read

    You add the numbers together to give the permission you want, 4+2+1=7 so that gives read, write and execute.
    4+1 =5 so that gives read and execute.
    0 give no permissions.

    You can also use recursive with chmod the same way you do with chown
    Code:
    chmod -R 750 /directory
    Again anything owned by root or another user needs you to do sudo before editing.

    you can google for the manual pages if you need the more advanced commands for both

    All this should give you an idea how to get read and write access to anything you like but as I said if the owner is root:root then changing that is a bad idea.

    AS you mentioned WINE, and i dont really use it you might find the ownership is set to root:WINE

    This would mean its owned by root but the WINE group has access to it. If you just want to be able to edit wines files without using sudo you could add yourself to the WINE group.

    I'm not sure of the security implications of this but I'd think that beyond screwing up wine there wouldnt be any serious issues.
    Always do things the hard way. After a while you learn how to make the hard way the easy way.

    My blog: http://foreverythingit.co.uk

  10. #20
    Join Date
    Sep 2007
    Location
    UK
    Beans
    375
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Just want full root access for everything chown makes no sense :(

    by basic I meant long
    Always do things the hard way. After a while you learn how to make the hard way the easy way.

    My blog: http://foreverythingit.co.uk

Page 2 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •