Ubuntu Servers :: How To Refuse Accessing Parent Directory In FTP Client Program
Feb 18, 2010
I am runnung ubuntu 9.10 desktop edition as a server. I am using a FTP client program to upload some files(index.html, background.png, etc) and everything is fine with that. And currently all my files are in /home/myname/ folder. What I want is whenever I log in with my ubuntu account in the FTP client program, I can actually see the list or contents of the very root directory.
In other word, I can see every folder like /bin, /boot, /etc, /root, so on in the FTP software and I can download it. I don't want to allow to access the parent(or root) directory. Is there any possible way to set up the sutff?
I have a redhat server with SAMBA file services. I have copied all the users files into their respective home directories and mapped a network drive to their folders. However, when I try to access a file in those folders the machine reboots itself. There are no error messages or anything, it just reboots!
(This was posted at the end of another thread, where it probably didn't belong, so reposting here)I have Active Directory set up on one machine (and I can't really adjust the settings very much) and Ubuntu Server 10.04, which I would like to use as a client.I followed the directions at https://help.ubuntu.com/community/LD...Authentication, but when I get to
Code: getent passwd I don't see anything from the LDAP, and ssh'ing into the box from an LDAP/AD username certainly doesn't work.
In addition, I've attempted to use Webmin's LDAP Configuration module to configure it. I can connect to the server and can browse it with the LDAP browser with my settings, but the Webmin package doesn't recognize the users (which are organized in one of four Organizational Units (OUs) within the OU that I have as my Search Base) as users,
I have a FAT32 SD card with a file on it, that, viewed in Windows the filename consists of a long string of nonsense. Viewed in my Android phone's Linux terminal, ls -a shows nothing in the directory. When I try to delete the parent directory with rm -rf deleteme, it fails with "Directory not empty". When I try to delete/move in Windows 7, it says the filename would be too long and/or Explorer crashes. Windows disk check doesn't find anything wrong. How can I delete this?
I am using fedora 13. When I list the root directory with the command: 'ls -la'. I see the parent directory symbol as '..' So, which is the parent directory for root directory?
I've found several posts discussing how to do this in with the terminal, but none exactly fit what I am trying to do. And since I'm still very new, I was hoping for some help.
I have a parent directory called "Music." The subdirectories all start with "artist", some go further as in "artist/album/cd1". So right now the structure varies in the following ways code...
How can I move all the files (or the file types that I choose) to the parent directory "music"?
(By the way, for any who are interested, this is so that I can use an external hd with a PS3. ("playstation 3"--for anyone who was in my predicament searching the threads)
Create the following directories: parent/child Navigate to child and create a file named child (this is an executable file in my case, not sure if that makes a difference). I need to create two "link to executable" links in the parent.
I had assumed that this would work: ln -sf ./child ../child1 ln -sf ./child ../child2
But that creates a "link to folder" (./child) in the parent directory. If I change it to: ln -sf -t.. ./child child1 ln -sf -t.. ./child child2 I get an error, "ln: '../child': cannot overwrite directory".
If I do it from the parent directory (which I cannot do, this is part of a Makefile recipe): ln -sf ./child/child ./child1 ln -sf ./child/child ./child2
It works. Note that I cannot alter the names of any directories or files. How do I create the links when the current directory is the child?
I keep getting a segfault in compiz. I've tried everything! This is from a fresh install without and accelerated drivers (I have ATI)
Quote:
Code:
**Switching to Compiz window management** /usr/local/bin/compiz-indicator:99: GtkWarning: Can't set a parent on widget which has a parent menu.append(kill) /usr/local/bin/compiz-indicator:100: GtkWarning: Can't set a parent on widget which has a parent menu.append(start)
I'm able to use the following to remove the target directory and recursively all of its subdirectories and contents. find '/target/directory/' -type d -name '*' -print0 | xargs -0 rm -rf
However, I do not want the target directory to be removed. How can I remove just the files in the target, the subdirectories, and their contents?
I have a directory called data. Then I am running a script under the user id 'robot'. robot writes to the data directory and update files inside. The idea is data is open for both me and robot to update.
So I setup the permission and owner group like this
drwxrwxr-x 2 me robot-grp 4096 Jun 11 20:50 data
where both me and robot belongs to the 'robot-grp'. I change the permission and the owner group recursively like the parent directory.
I regularly upload new files into the data directory using rsync. Unfortunately, new files uploaded does not inherit the parent directory's permission as I hope. Instead it looks like this
-rw-r--r-- 1 me users 6 Jun 11 20:50 new-file.txt
When robot tries to update new-file.txt, it fails due to lack of file permission.
I'm not sure if setting umask helps. In anycase the new files does not really follow it.
$ umask -S u=rwx,g=rx,o=rx
I'm often confounded by Unix file permission. Do I even have a right plan? I'm using Debian lenny.
I've mucked through and figured out how to mount a windows share. I can access the folders I was looking for, but the windows share was not what I thought it would be. I was looking for the specific shared folder. Instead I got a root level parent directory that included the folder I wanted, and a couple others.
smbclient -L <ipaddress> gives me a parent directory on the root
First question: Can I mount a specific folder within a share? Second question: Could somebody define share? I thought it was the specific shared folder, but that doesn't seem to be the case.
i wanted to capture the stdout and stdin of a child process within a parent so that any output of child is sent to the parent and any input taken from the parent. code is simple enough and i have followed all code guidlines on the internet (some guidlines do differ also) my select call either hangs if i do not give a tmeout and with a timeout it returns 0 descriptors to be written to or read from:
below is the simple code for parent:
int main(void) { int outfd[2]; int infd[2];
[code].....
why select hangs without a timeout ... why can it not detect that the pipe is write ready i.e parent can write to it ... if it does not detect tha read pipe as having data...
and my current working directory is sub1link, is there a quick way to either: change directory to link source parent (i.e something similar to cd .. but take the user to /dir1/ change directory to link source (i.e switch from /dir2/sub1link/ straight to /dir1/sub1
I am facing a problem in Windows due to a virus called Newfolder.exe which creats files with the same name as it's parent directory and an extension .exe and this happens for every directory in the entire hierarchy in the infected pen drive. The antivirus detects them, but is sucking slow. So I thought this is a good opportunity to use the concepts of the all mighty shell script to remove those as they follow the same pattern. Say my complete path is
Code:
/home/pkd/fol1/
The virus would have created an file with complete paths
Quote:
/home/pkd/fol1.exe
If fol1 has two more directories fol11 and fol12 Then there would be two more .exe(virus created) in the following path
I have an Ubuntu jaunty fileserver. I connect to the machine from time to time using the Nomachine client on windows.Everything is setup and working perfectly, except for one thing. When I acces the server remotely, I cannot access any external USB drives connected to it. The drive mounts fine, and is available when logged on locally to the machine, just not when logged in via Nomachine.
1>i want to know how i can get list of all my client ip address whois accessing my server.either from LAN or WAN. 2>Also if some one changing my pc ip addressing for a while to use internet then how i get to know this that which pc has used my ip....
I want to access ftp server without entering user name and password ,second thing i have create repository on my Installation Server that is redhat os now i have created another server and i want to access that repository so what changes i can do on /etc/yum.repos.d/server.repo file
I have configured server ubuntu 11.04. Everything works fine, but there is a need for some clients to connect local hard drive. What should I do? How and what modules are added to the ltsp-image? How to register in the fstab on the client? Maybe I'm going the wrong way?
Everytime I start Rhythmbox it starts to scan my USB HardDrive (which contains 50,000+ files) for media. I searched around, and it seems that there is nothing one can do stop that using any Rhythmbox options, switches, etc. Is there a way to prevent a process (in this case Rhythmbox)from using a certain resource (the path to my USB Drive)? I'm thinking APPArmor or SELinux may be the way to do it.
I've searched the forums (250 thread limit) for a fix on this, but all the questions seem unanswered or unrelated. My situation is this: I'm running Ubuntu x64 10.10 'Maverick'. I have a cablemodem connection for my Internet access. I have home network running on DD-WRT with the dreadful Linksys WRT54G series router.
My DD-WRT router is 192.168.1.1, subnet 255.255.255.0. My Linux box is 192.168.1.61, subnet 255.255.255.0.
I have a VyprVPN connection set up successfully on Linux. Mostly everything works great, speed's fine, latency is what I expect it to be. Except... I also run an SSH server to remotely admin the box at port 22, an Apache server running over SSL at port 7001, and a Transmission web client at port 7002 (only secured by basic HTTP realms auth). All of these things worked before I got the VPN working, I'm of course using NAT at the DD-WRT router.
The endresult I am looking for, is to have the security and protection of the VPN (even if it's only perceived) for everything I do on this machine -- EXCEPT on Apache, the Transmission web panel, and the SSH server, which I want to access from the outside world. I have no firewalls running or configured, not even iptables, not even the SPI firewall on DD-WRT. All connections to the aforementioned services from the outside world timeout coming in to the Linux box. They all work from inside my home network (182.168.1.0/24). In case it's needed, he's my routing:
Is it possible to access windows network printers from a VirtualBox WindowsXP client running under Ubuntu 10.10 host? The networking type is NAT. Would Bridged Networking solve the problem? If so, is there a tutorial on how to set up bridged networking for virutual box?
I have a machine acting as a gateway for a private network. While it can ping hosts on that private network, I can't use samba (smbclient or smbmount) to access shares on hosts on the private network from that machine. Other machines on the private network can access shares on other machines - just not the gateway server.
Here's how the gateway is configured:
When I try to connect to ports 139 or 445 (via smbclient or smbmount) the mount() system call times out. As I mentioned above, I can ping those hosts, so UDP packets work but TCP packets seem to get blocked or lost.
I searched online, but I was unable to find anything on this. I recently tried to install a program, but it did not work. After that, anytime I would open a folder that is located on the local computer, it would close out of Nautilus. I thought that was the extent of the problem, but I just discovered that if I click "Open" on any program, it closes that program out. I was able to plug in a jumpdrive and browse the files on it, but as soon as I clicked on a folder that was local, it would kill the program. I am using 8.10, by the way.
I am trying to write to the parallel port pins from a Perl program running Ubuntu Linux, to light up led's on a bread board. I've already accomplished this on this same box using a C program, but I cannot get my code below to work. I believe the problem is with the line: $parport = Device::ParallelPort->new('auto:0'); I've tried different variables between the ('') ticks, but nothing has worked. I use Perl on my web pages for forms, but this has stumped me.
Code is below: #!/usr/bin/perl require "subparseform.lib"; &Parse_Form; print "Set-cookie: cart_id=1234; user_id=123; "; print "Content-type: text/html "; use strict; use CGI; use Device::ParallelPort; # use Device::ParallelPort::drv; # use Device::ParallelPort::drv::linux # use Device::ParallelPort::drv::parport # Set up your parallel port object and tell it what driver to use. #my $parport = Device::ParallelPort->new('auto:0'); print "It works!!!";
I am trying to move all the txt files with a script from multiple directories to one directory, adding the parent directories of the files to the file names.It's a little complicated to explain, but i hope the script i have so far explains what im trying to do better:
With VirtualBox you can share a directory on the host machine with the guest machine. Can you share a directory on the guest machine with the host machine? In my setup the host is Windows 7 and the guest is Ubuntu. Can I have a directory on the Ubuntu file system accesible from Windows?