Solved

Linux RHEL 5 - Chmod issue

Posted on 2011-09-23
5
521 Views
Last Modified: 2012-05-12
Hi, I am attempting to upload a file into a specific folder using WinSCP..  I need to change a directory to give a specific user upload rights onto the Linux box.

How do I do this from the command line?  Thanks

0
Comment
Question by:NYGiantsFan
5 Comments
 

Author Comment

by:NYGiantsFan
ID: 36587157
When I attempt to change this within WinSCP i get the following error:

Command 'chmod 0770 "tmp"'
failed with return code 1 and error message
chmod: changing permissions of 'tmp': Operation not permitted.
0
 
LVL 30

Accepted Solution

by:
Brad Howe earned 250 total points
ID: 36587219
Hi,

chmod can only be run under ROOT or the use of a sudo'er account.

To only give full permission to user and group, use it as follows:

account # sudo chmod 0770 /folder-path
    -    Enter account password
OR
account # su -
   -     Enter root password
root # chmod 0770 /folder-path

Cheers,
Hades666
0
 
LVL 11

Expert Comment

by:jgiordano
ID: 36587333
are you trying to change the /tmp filesystem permissions? I would advise against that. I would crate a subfolder within /tmp then use that.
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36588297
/tmp should be writable by that user, unless you did something unwise with permissions for /tmp.

Have you tried to upload it to /tmp ?  What does WinSCP say when you do?  You say "tmp" and not "/tmp" so I'm not sure where you are trying to run that chmod.

BTW, chmod 0770 isn't going to help unless the user either owns that directory or is in the group for that directory.

Paste command outputs please.
0
 
LVL 38

Assisted Solution

by:wesly_chen
wesly_chen earned 250 total points
ID: 36589344
> chmod: changing permissions of 'tmp': Operation not permitted.
You need to be the owner of "tmp" so you can run "chmod" on it.

You can try to create another directory, say "temp" (so you are the owner of "temp". When this directory created successfully, then do
chmod 0770 temp
  to see if you can do it or not.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question