You are not logged in.

#1 2008-06-12 18:58:46

unprogram
Member
Registered: 2008-05-27
Posts: 17

There are some files and directories = access denied

Could anyone supply the chmod command to reset all the permissions in my own home directory to what they should be ? I.e. so that I can open them when I am not root!

Offline

#2 2008-06-12 19:07:06

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: There are some files and directories = access denied

You probably want to

sudo chmod $HOME -R u=rw,g=r,o= ; sudo chown $USER $HOME ; find $HOME -type d -exec chmod +x {} \;

Last edited by Spider.007 (2008-06-12 19:07:25)

Offline

#3 2008-06-12 19:48:22

sniffles
Member
Registered: 2008-01-23
Posts: 275

Re: There are some files and directories = access denied

I thought 'sudo' was an Ubuntu-ism, but I guess its horribleness is spreading to other distributions. Is sudo even in base?

Alas, blindly setting permissions to all the files in your home dir to 640 might break things. I.e. stuff which should be executable, or just about -need- to have other permissions.

Offline

#4 2008-06-12 19:51:06

unprogram
Member
Registered: 2008-05-27
Posts: 17

Re: There are some files and directories = access denied

Thankyou! I can now save settings in pcmanfm. hurray

Offline

#5 2008-06-12 19:52:00

unprogram
Member
Registered: 2008-05-27
Posts: 17

Re: There are some files and directories = access denied

oh and I previously had installed sudo. Sorry sniffles!

Offline

#6 2008-06-12 19:53:53

Shadowmeph
Member
From: West Coast Canada
Registered: 2008-05-19
Posts: 208

Re: There are some files and directories = access denied

sniffles wrote:

I thought 'sudo' was an Ubuntu-ism, but I guess its horribleness is spreading to other distributions. Is sudo even in base?

Alas, blindly setting permissions to all the files in your home dir to 640 might break things. I.e. stuff which should be executable, or just about -need- to have other permissions.

is it I didn't know that I thought that sudo was in all linux I learn something new everyday smile

Offline

#7 2008-06-12 20:50:10

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: There are some files and directories = access denied

Nope, sudo has been around long before Ubuntu..long before Debian and long before GNU and Linux, for that matter. wink

Offline

#8 2008-06-12 23:06:11

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: There are some files and directories = access denied

Yes, but I agree with ol' sniffles here, Ubuntu over-uses sudo! I mean, come on! It's a nice tool but it's not meant to replace 'su'...

It's like when your girlfriend starts listening to one of your favorite heavy metal bands all the time. It just makes you feel gay hearing it later on big_smile

That's taking all the fun from it...


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#9 2008-06-12 23:48:14

Zer0
Member
From: Windsor, ON, Canada
Registered: 2006-08-25
Posts: 299

Re: There are some files and directories = access denied

I guess I'm a sudo over user then wink
I hardly ever use su directly, unless I am going to do more then one privileged command at a time.

Offline

#10 2008-06-13 00:30:33

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: There are some files and directories = access denied

sudo transformed my archlinux installation into a windows one:
my user can invoke sudo without ever supplying a password, true story...

Offline

#11 2008-06-13 06:30:09

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: There are some files and directories = access denied

I did that, got rid of the requirement for password, as I believe I'm the only one in family that uses linux.


There is a difference between bleeding [edge] and haemorrhaging. - Allan

Offline

#12 2008-06-13 08:35:34

sniffles
Member
Registered: 2008-01-23
Posts: 275

Re: There are some files and directories = access denied

Misfit138 wrote:

Nope, sudo has been around long before Ubuntu..long before Debian and long before GNU and Linux, for that matter. wink

Indeed, but as far as the Linux/BSD universe in concerned, Ubuntu was the one to popularize it, so that now you see it almost everywhere someone posts a command which needs to be run as root. Instead of saying "run as root" : <some command> they say -- run sudo <some command>.

sudo is fine and dandy I suppose, but users tend to not know what they're doing, some end up creating a 2nd "super-user" (so they might as well just be using root directly) [possible examples carlocci and XFire ?]

Last edited by sniffles (2008-06-13 08:37:22)

Offline

#13 2008-06-13 09:00:11

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: There are some files and directories = access denied

Using sudo to grant a single user root privileges defeats the purpose of the root account. sudo is not meant to be used in that way.

I, for example have sudo installed and set up and I use it for some commands that I run often, but surely not for everything!


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#14 2008-06-13 09:07:32

Vintendo
Member
From: Netherlands
Registered: 2008-04-21
Posts: 375
Website

Re: There are some files and directories = access denied

I only use it to edit files in /etc/ and some programs. But what's the benefit of su over sudo?

Offline

#15 2008-06-13 09:31:26

sniffles
Member
Registered: 2008-01-23
Posts: 275

Re: There are some files and directories = access denied

Vintendo: how exactly have you told sudo to only allow you to edit some files in /etc ?

Offline

#16 2008-06-13 12:54:31

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: There are some files and directories = access denied

sudo is meant for systems where you anticipate more than one person administrating systems.  Sudo will log actions, which increase accountability.  You also can assign sudoers different permissions, so you can have one person or department handling one particular aspect, while someone else manages another.  This prevents puts in more control so people can't just do whatever they want.  You can also disable the root account.  So actually, it is sort of meant to replace sudo.  I'm not exactly sure, but I think disabling the root account will increase security?

Offline

#17 2008-06-13 13:40:34

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: There are some files and directories = access denied

moljac024 wrote:

Using sudo to grant a single user root privileges defeats the purpose of the root account. sudo is not meant to be used in that way.

Root is me anyway: it's just a fast way to tell the program: "Just friggin do it, this is an absolute order, don't make me su -c command enter password enter"
It's just a 3* letters alias for "please don't look while I write my password" su -c command enter password enter.

I, for example have sudo installed and set up and I use it for some commands that I run often, but surely not for everything!

that's insecure anyway




* I rename /usr/bin/sudo to a different name to prevent some stupid applications, like yaourt, from trying to run "sudo program" automatically without notifying me

Offline

#18 2008-06-13 14:47:28

Vintendo
Member
From: Netherlands
Registered: 2008-04-21
Posts: 375
Website

Re: There are some files and directories = access denied

sniffles wrote:

Vintendo: how exactly have you told sudo to only allow you to edit some files in /etc ?

I haen't made it that way. That's just the only reason why i use it..

Offline

Board footer

Powered by FluxBB