[How To] Ignore Permissions on a disk

New to SGIs? Need help getting things going? This is the forum for you!
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
fu
Posts: 1119
Joined: Thu Sep 29, 2005 9:39 am
Location: constant traveler [nyc/london/berlin]
Contact:

[How To] Ignore Permissions on a disk

Unread postby fu » Fri Feb 08, 2008 2:02 pm

i recently added some scratch disks on my fu:el, how do i make them permission-agnostic?

mac os x permissions.png
ignore permissions on this volume


right-clicking and changing permissions for each + every folder does not seem like a viable solution for a scratch disk...

permissions_irix.png
irix permissions


i only have 2 acounts on the fu:el (root + fu) and though i granted all privileges to fu i still get "no u can't do this/that" attitude for certain tasks (like mounting my nfs-shared disk on the Mac)...
Last edited by fu on Fri Feb 08, 2008 2:43 pm, edited 1 time in total.

User avatar
nekonoko
Site Admin
Site Admin
Posts: 8145
Joined: Thu Jan 23, 2003 1:31 am
Location: Pleasanton, California
Contact:

Re: [How To] Ignore Permissions on a disk?

Unread postby nekonoko » Fri Feb 08, 2008 2:23 pm

chmod 666 /scratch
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.

User avatar
fu
Posts: 1119
Joined: Thu Sep 29, 2005 9:39 am
Location: constant traveler [nyc/london/berlin]
Contact:

Re: [How To] Ignore Permissions on a disk?

Unread postby fu » Fri Feb 08, 2008 2:36 pm

^ zen-q neko

i knew it would be a one line command, (just like one tick one the Mac), (didn't know which one though)

User avatar
cybercow
Posts: 559
Joined: Wed Mar 21, 2007 7:07 pm
Location: Europe

Re: [How To] Ignore Permissions on a disk

Unread postby cybercow » Sat Feb 09, 2008 2:49 am

i supose if you do 666 you must be the owner to access dirs/files ? the recursive permission set is done by "-R"

Code: Select all

chmod -R <octal_perm> <dir>
example:

Code: Select all

chmod -R 775  /scratch
although if you are a part of a group that can`t access it you must chown it.

User avatar
tomo
Posts: 226
Joined: Fri Jan 18, 2008 2:53 am
Location: Europe, Slovakia - Trencin
Contact:

Re: [How To] Ignore Permissions on a disk

Unread postby tomo » Sat Feb 09, 2008 2:52 am

If you have already som files/ directories on it then use chmod -R 666 /scratch but you must be root to change permissions of someone else files.
:O2: R7000/600 576MB Ram CDRW 18+9Gb HDD
http://www.tomosgi.co.cc

User avatar
stuart
Posts: 912
Joined: Mon Aug 23, 2004 5:37 pm
Location: Cambridge, UK
Contact:

Re: [How To] Ignore Permissions on a disk

Unread postby stuart » Sat Feb 09, 2008 6:27 am

Erm - definitely not 666, because '666' == '-rw-rw-rw-': One of the idiosyncrasies of UNIX it that to enter a directory, that directory must be executable. Therefore, you probably want something along the lines of:

Code: Select all

find /scratch -type d -exec sudo chmod 777 {} \;
... which will make all of your directories (only) world writable.

The other thing you might want to investigate is changing the ownership of /scratch (and all below it) to root:user, and then use 'chmod ug+rwX' on the contents - this preserves world/other permissions, whilst allowing root and anyone in the 'user' group to read and write the files/directories, and execute them if and only if they were already executable beforehand.

Finally, a great tip is 'chmod 1777' on a directory - this effectively makes the directory 'append-only':
STICKY DIRECTORIES
A directory whose `sticky bit' is set becomes an append-only directory,
or, more accurately, a directory in which the deletion of files is
restricted. A file in a sticky directory may only be removed or renamed
by a user if the user has write permission for the directory and the user
is the owner of the file, the owner of the directory, or the super-user.
This feature is usefully applied to directories such as /tmp which must
be publicly writable but should deny users the license to arbitrarily
delete or rename each others' files.

User avatar
fu
Posts: 1119
Joined: Thu Sep 29, 2005 9:39 am
Location: constant traveler [nyc/london/berlin]
Contact:

Re: [How To] Ignore Permissions on a disk

Unread postby fu » Sat Feb 09, 2008 7:46 am

thanks for the update guys

after chmod 666 /scratch only root could see/access the files/directories who were already there, under my user account i got an empty folder/disk... (i geuss this happened because i transfered files over nfs to /scratch as root)

i'll give your tips a try and report back

User avatar
Arabski
Posts: 258
Joined: Wed Feb 28, 2007 11:03 am
Location: Poland
Contact:

Re: [How To] Ignore Permissions on a disk

Unread postby Arabski » Sat Feb 09, 2008 12:43 pm

fu wrote:(i geuss this happened because i transfered files over nfs to /scratch as root)


No, it's because:

stuart wrote: to enter a directory, that directory must be executable
Image * Image


Return to “Getting Started, Documentation, Tips & Tricks”

Who is online

Users browsing this forum: No registered users and 1 guest