[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problem with chmod



On Thu, 2 Apr 2009, Alex Samad wrote:


On Thu, Apr 02, 2009 at 07:55:59PM +0800, Bret Busby wrote:

I have created a new data partition for a Ubuntu/Debian dual boot
system, using gparted from the Debian 4 installation.


[snip]

"
chmod 777 /data

I think when you use octects you have to prefix with 0 so try chmod 0777
/data


"
bretnewworkstation:~# chmod 0777 /data
bretnewworkstation:~# ls -l /data
total 16
drwx------ 2 root root 16384 2009-04-02 17:34 lost+found
"

That didn't work.


bretnewworkstation:~# ls -l /data
total 16
drwx------ 2 root root 16384 2009-04-02 17:34 lost+found
"

Attempts:

"
bretnewworkstation:~# chmod 777 /data
bretnewworkstation:~# ls -l /data
total 16
drwx------ 2 root root 16384 2009-04-02 17:34 lost+found
bretnewworkstation:~# chmod rwxXstugoa /data

can't have xX on the same option

chmod: invalid mode: `rwxXstugoa'
Try `chmod --help' for more information.
bretnewworkstation:~# chmod +rwxXstugoa /data
chmod: invalid mode: `+rwxXstugoa'
Try `chmod --help' for more information.
bretnewworkstation:~# chmod --help
Usage: chmod [OPTION]... MODE[,MODE]... FILE...
  or:  chmod [OPTION]... OCTAL-MODE FILE...
  or:  chmod [OPTION]... --reference=RFILE FILE...
Change the mode of each FILE to MODE.

  -c, --changes           like verbose but report only when a change is
made
      --no-preserve-root  do not treat `/' specially (the default)
      --preserve-root     fail to operate recursively on `/'
  -f, --silent, --quiet   suppress most error messages
  -v, --verbose           output a diagnostic for every file processed
      --reference=RFILE   use RFILE's mode instead of MODE values
  -R, --recursive         change files and directories recursively
      --help     display this help and exit
      --version  output version information and exit

Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'.

Report bugs to <bug-coreutils@gnu.org>.
bretnewworkstation:~# chmod ugoa*+ rwx /data
chmod: invalid mode: `ugoa*+'
Try `chmod --help' for more information.
bretnewworkstation:~# chmod ugoa*+ rwx /dev/hda8
chmod: invalid mode: `ugoa*+'
Try `chmod --help' for more information.
"

maybe try

chmod u=rwx,g=rwx,o=rwx /data

That didn't work;

"
bretnewworkstation:~# chmod u=rwx,g=rwx,o=rwx /data
bretnewworkstation:~# ls -l /data
total 16
drwx------ 2 root root 16384 2009-04-02 17:34 lost+found

"


or

chmod ugo=rwx /data

that should work


"
bretnewworkstation:~# chmod ugo=rwx /data
bretnewworkstation:~# ls -l /data
total 16
drwx------ 2 root root 16384 2009-04-02 17:34 lost+found
"

That also didn't work.



The current status of the partition is:
"
 ls -l /data
total 16
drwx------ 2 root root 16384 2009-04-02 17:34 lost+found
"

The Debian fstab entry (I edited the fstab file, to incorporate the
partition, from the Debian side) is
"
/dev/hdc8       /data           ext3    defaults        0       0
"

Any helpful suggestions would be appreciated.




Thank you anyway, for the suggestions.

--
Bret Busby
Armadale
West Australia
..............

"So once you do know what the question actually is,
 you'll know what the answer means."
- Deep Thought,
  Chapter 28 of Book 1 of
  "The Hitchhiker's Guide to the Galaxy:
  A Trilogy In Four Parts",
  written by Douglas Adams,
  published by Pan Books, 1992

....................................................


Reply to: